If you find these tutorials useful, Please consider making a donation.

Vim 5
Visual Mode

Video 16 - Visual Mode

Vim has a mode called Visual Mode, Visual mode will highlight a selection of text that you can then take action on.

Most of the things we have learned so far apply to Visual Mode, like "w" for word and "e" for end of word, and pressing escape gets out of Visual Mode.

The "find in line" is used with Visual Mode to yank (copy) some text and put (paste) it within some quotes (using the i for in).

Pressing an upper case "V" (instead of lower case "v") will take you into Visual Line mode, where you can visually select using the entire line(s).

Put (or Paste) from visual mode is slightly different that put in normal mode, because it takes the text that was replaced, and puts it in the Visual Mode buffer. Making it difficult to paste the same text multiple times, because once the text is pasted, the text it replaced is now put into the Visual Mode buffer.


Video 17 - Visual Block Mode

Vim Visual Block mode allows you to select text in columns.

In this video, you will see how to make a visual block selection; and then use:

"I" to insert to the left of the Visual Block
"A" to append to the right of the Visual Block
"c" to change the Visual Block
"d" to delete the Visual Block

You will then see how to use Visual Block mode to make a comment box.