Selecting large text on VI

Custom
August 1, 2006 at 08:19:47
Specs: WinXP/Linux, P4 / 255
First of all, cheers to all of you, there has been a while not posting here... It feels good to post again ;)

OK, I will go straight to the point, I have been some time without using *NIX nor some commands, my question is: How can I select a large text in a file using VI, without sending the file by email to another app.

Apportion: There is a file with about 500 lines, I want to select them all to copy all the lines to another email client, I cant send it thrue PINE or MAIL (some sysadmin requests :( ).

Any help will be appreciate.


Don´t freak out until you know the facts...Relax...!


See More: Selecting large text on VI

Report •


#1
August 1, 2006 at 10:21:26
It's impossible to use vi to "select all" and copy outside of vi.

Use:

$ cat file.txt

to display the contents of the file on the screen. Then, copy the lines from the screen.

For examples:

If you use cygwin, right-click on the screen title bar and select "Edit", then "Select All"...

If you use putty, right-click on the screen title bar and select "Copy All to Clipborad"

Luke Chi


Report •

#2
August 1, 2006 at 10:37:52
In vi, you only can "select" and write to the current file or another file.

Luke Chi


Report •

#3
August 1, 2006 at 12:43:47
lchi2000g,

I'm using Putty, and selecting Copy All To Clipboard does not work as you mentioned before, it only copy the showed lines, but not all the 500 lines in the .txt file :(

Is there any other procedure ?

Don´t freak out until you know the facts...Relax...!


Report •

Related Solutions

#4
August 1, 2006 at 14:38:30
It worked on my putty. Try one more time. You also could use google to search "putty copy all to clipboard" to see if you need the latest version or...

Steps:

1. Reset Terminal
2. Clear Scrollback
3. Copy All to Clipboard

Luke Chi


Report •

#5
August 1, 2006 at 14:47:09
You also need to right-click the top title bar to change the setting to 1000 to increase the # of lines of the scrollback before you "Copy All to Clipborad".

Window->Lines of scrollback 1000

Luke Chi


Report •


Ask Question