Vim has three kinds of Visual mode. In Character-wise Visual mode, we can select anything from a single character up to a range of characters within a line or Spanning multiple lines. This was suitable for working at the level of individual words or phrases. If we want to operate in entire lines, we can use Line-wise Visual mode instead. Finally, block-wise Visual mode allows us to work with columnar regions of the document
VIM provides 3 forms of visual mode.
The first is the character pattern, which enters the mode by entering command V, enabling you to select multiple characters or even multiple lines of characters from the beginning of a character. This pattern is suitable for dealing with words or paragraphs.
The other is a row pattern. Ability to select single or multiple lines at high speed.
The third is block mode, which allows you to select a character in a square area of text.
, we can enter the command lowercase v
and enter the character mode.
Enter command capitalization V
to enter line mode.
Enter the command ctrl+v
into block mode.
Then combine the move command. Select the desired character area.
v
Enter the character visual mode,
b
Moves the first character to the previous word for the move command. In visual mode, the selection is added to the previous character, which selects the T character range to ' to '.
Run the b
command again. The selection range is added to the first character H here.
In visual mode one end is fixed, the other end is mutable, and we can o
change both ends by command.
In this example, o
after running, move the driven by to the left of H to the right, run the e
command, and select the range to be added back to the end of the next word.
[Practical.vim (2012.9)]. DREW.NEIL.TIP21 Study Summary