Sunday, November 29, 2009

text selection

text selection
If you want to do the same thing to a collection of lines, like cut, copy, sort, or format, you first need to select the text. Get out of insert mode, hit one of the options below, and then move up or down a few lines. You should see the selected text highlighted.

V - selects entire lines
v - selects range of text
ctrl-v - selects columns
gv - reselect block

After selecting the text, try d to delete, or y to copy,

or indent text:
> . . .

or search & replace:

or :center

or !sort

:help motion
:hep visual-mode
:help shift-left-right

No comments: