Selecting Text (Visual Mode)
Open/Edit a file using the command vi/vim.For example: vi filename OR vim filename
To select text, enter visual mode with one of the commands below, and use arrow keys to highlight the text you are interested in. Then, use some command on the text.
Commands to enter Visual Mode:
Use Ctrl + v to start Visual mode Blockwise. OR Use Shift+v (V) to start Visual mode linewise. OR Use v to start Visual mode per character.
The operators that can be used are: ~ switch case d delete c change y yank > shift right < shift left ! filter through external command = filter through 'equalprg' option command gq format lines to 'textwidth' length Any time following are the basic commands to remember.
v | start Visual mode per character. |
V | start Visual mode linewise. |
<Esc> | exit Visual mode without making any changes |
No comments:
Post a Comment