Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-23-2015, 10:10 PM
|
#1
|
Member
Registered: May 2011
Posts: 562
Rep: 
|
Copy all text
Hi,
I choose all text of the file, by
gg"*yG
does it mean the text already goes to Clipboard, as I cannot paste them out?
|
|
|
11-23-2015, 10:15 PM
|
#2
|
Member
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634
|
You should mention what editor you're using.
By the keys you entered, my guess is vi(m)
The "gg" goes to the top of the screen, y indicates copying data to the buffer, and G means go to bottom of file.
The buffer is inside of vi(m) so you can use p to paste it.
|
|
|
11-24-2015, 01:55 AM
|
#3
|
Member
Registered: May 2011
Posts: 562
Original Poster
Rep: 
|
Thanks. I'm using vi editor. If I've gone to web browser. How to paste the text?
|
|
|
11-24-2015, 02:17 AM
|
#4
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,192
|
|
|
|
11-24-2015, 02:51 AM
|
#5
|
Member
Registered: May 2011
Posts: 562
Original Poster
Rep: 
|
I tried and I cannot copy all text of the file by
gg"+yG
|
|
|
11-24-2015, 02:53 AM
|
#6
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,192
|
what do you mean by that? What have you tried, what happened?
|
|
|
11-24-2015, 03:57 AM
|
#7
|
Member
Registered: May 2011
Posts: 562
Original Poster
Rep: 
|
I press
gg"+yG
on Text file within vi editor, then have gone to web browser, but I cannot paste the whole text file into web email.
|
|
|
11-24-2015, 03:58 AM
|
#8
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,192
|
what kind of vi(m) do you use? Version??
|
|
|
11-24-2015, 04:12 AM
|
#9
|
Member
Registered: May 2011
Posts: 562
Original Poster
Rep: 
|
Sorry, how to get the version of vi editor being used?
|
|
|
11-24-2015, 05:11 AM
|
#10
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,192
|
:version
|
|
|
11-24-2015, 09:09 AM
|
#11
|
Member
Registered: May 2011
Posts: 562
Original Poster
Rep: 
|
Sorry, it's VIM 7.0
|
|
|
11-24-2015, 11:13 AM
|
#12
|
Member
Registered: Nov 2015
Location: Houston, Texas, US
Distribution: RHEL/CentOS, Debian/Linux Mint, SLES
Posts: 40
Rep:
|
If you are copying text from your vi window to a browser window, you may be able to highlight the text with your mouse in vi, then right-click in your browser window and paste.
|
|
|
11-24-2015, 07:04 PM
|
#13
|
Member
Registered: May 2011
Posts: 562
Original Poster
Rep: 
|
This is not good actually! How about that there're one million lines inside the file?
|
|
|
11-24-2015, 07:10 PM
|
#14
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,659
|
Quote:
Originally Posted by Huamin
This is not good actually! How about that there're one million lines inside the file?
|
How about you try to read the documentation on VIM yourself???
...or look something up on Google, which would show you:
Code:
shift v -- visual mode
shift g -- jump to eof
"*y -- yank select text
:e my_new_file -- create a new file
"*p -- paste into a new file
|
|
|
11-27-2015, 09:30 AM
|
#15
|
Member
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207
Rep: 
|
in vi (elvis), enter ed mode with : as seen here
KEYSTROKES
:1,$y
now do
$ man ed
read the ed(1) manpage about what ed does and that entering : mode allows you to give ed commands (also vi features). realize in vim, ed slighly altered not "full", thank elvis for providing access to ed within vi(1)
for scripting sh(1), ed(1) is extremely useful for automated text editing (awk(1) is as well)
whooo baby!
if your using xterm, vi(1) selections of course do NOT go into X11's Clipboard automatically, they must be selected (usu. with mouse)
HOWEVER elvis(1) has a an X11 mode which does work with X11's Clipboard, just install evis and use in X11 mode if you like it
Last edited by debguy; 11-27-2015 at 09:37 AM.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 09:15 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|