What is visual mode?
Visual mode gives us a way of selecting text and operations on it. Think of “highlighting” in other editors — only more powerful.
To use visual mode, you’d do this:
- move your cursor to where you want the start of your selection to be
- mark the start of the text with the
vkey - move your cursor to where you want the end of your selection to be
- perform an operation by typing an operator command
In visual mode, you use the navigation commands that you’re already familiar with to move around. And, as always, you can hit escape to re-enter normal mode.
Try selecting the ? characters in the editor and deleting them using visual mode. The x key in visual mode will delete the selection.