Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vi Question

Status
Not open for further replies.

tbohon

Programmer
Apr 20, 2000
293
US
I thought I remembered, from the dim reaches of my overfull memory, that it was possible to block out lines in a text file using vi and then delete/move/cut/copy them as a single entity. However, nothing I've tried and I don't see anything in 'man vi' that gives me a clue.

Thoughts/suggestions?

Tnx.

Tom

"My mind is like a steel whatchamacallit ...
 
I often use the m and ' commands.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
It sounds like you're thinking about folds, although they only work in vim, not vi. To create folds, first "set foldmethod=manual", then use "zf" to fold text. If you're editing a C file you can use "set foldmethod=syntax" to have vim create the folds for you. Use "zo" to open a fold and "zc" to close. See ":help fold" for more info.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top