Jul 29, 2004 #1 C cqmyg5 Advanced Member level 4 Joined Oct 21, 2003 Messages 118 Helped 3 Reputation 6 Reaction score 2 Trophy points 1,298 Activity points 963 if vi a text file longer than a screen as: #vi aa.log how to select "all" content of aa.log in current vi window?
if vi a text file longer than a screen as: #vi aa.log how to select "all" content of aa.log in current vi window?
Jul 29, 2004 #2 M miholee Newbie level 3 Joined Jul 16, 2004 Messages 4 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 6 type ggyG
Jul 29, 2004 #3 C cqmyg5 Advanced Member level 4 Joined Oct 21, 2003 Messages 118 Helped 3 Reputation 6 Reaction score 2 Trophy points 1,298 Activity points 963 Thank miholee! It show "nnn lines yanked", but how to paste these lines to another vi windows?
Jul 29, 2004 #4 R RoZ Junior Member level 1 Joined May 31, 2004 Messages 18 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 183 Hi, another way to apply commands to a part or all of a file is to specify the region by its line numbers. :1,10w newfile ... writes the first 10 lines to file 'newfile' :1,$s/foo/bar/g replace all occurances of 'foo' with 'bar' HTH, RoZ
Hi, another way to apply commands to a part or all of a file is to specify the region by its line numbers. :1,10w newfile ... writes the first 10 lines to file 'newfile' :1,$s/foo/bar/g replace all occurances of 'foo' with 'bar' HTH, RoZ
Jul 30, 2004 #5 N Nexus Po Newbie level 4 Joined Jul 25, 2004 Messages 6 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 60 Useful link/ebook on vi is at: **broken link removed** cheers. cqmyg5 said: Thank miholee! It show "nnn lines yanked", but how to paste these lines to another vi windows? Click to expand...
Useful link/ebook on vi is at: **broken link removed** cheers. cqmyg5 said: Thank miholee! It show "nnn lines yanked", but how to paste these lines to another vi windows? Click to expand...
Jul 30, 2004 #6 R realtek Member level 5 Joined Mar 15, 2004 Messages 89 Helped 1 Reputation 2 Reaction score 1 Trophy points 1,288 Activity points 870 >ESC(command mode) >1,%w:tmp >:r filename #(another file ) #go to the line where you want to past >:r tmp
>ESC(command mode) >1,%w:tmp >:r filename #(another file ) #go to the line where you want to past >:r tmp
Aug 5, 2004 #7 G gaonkc Advanced Member level 4 Joined Jul 16, 2004 Messages 103 Helped 2 Reputation 4 Reaction score 2 Trophy points 1,298 Activity points 635 you can use :%s for replace and CTRL - v ,then use cursor select all