Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to "select all" in "vi"?

Status
Not open for further replies.

cqmyg5

Advanced Member level 4
Full Member level 1
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?
 

Thank miholee!

It show "nnn lines yanked", but how to paste these lines to another vi windows?
 

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
 

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?
 

>ESC(command mode)
>1,%w:tmp
>:r filename #(another file )
#go to the line where you want to past
>:r tmp
 

you can use :%s for replace
and CTRL - v ,then use cursor select all
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top