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, which allows you to select multiple characters or even multiple lines of characters starting from one character. This pattern is suitable for dealing with words or paragraphs.
The second is the row mode, which allows you to quickly select one or more rows.
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 to select the desired character area.
v
Enter the character visual mode,
b
To move a command, move to the first character of the previous word, and in visual mode, increase the selection to the previous character, which selects the T character range to ' to '.
To execute the b
command again, select the range to add to here's first character H.
In visual mode, one end is fixed, the other end is mutable, and we can o
change both ends by command. In this example, after execution o
, move the driven by to the left of the H to the right, execute the e
command, and the selection is added back to the end of the next word.
[Practical.vim (2012.9)]. DREW.NEIL.TIP21 Study Summary