When is Visual mode used in Vim?

text-editor, vim

Solution

I use visual mode when I want to highlight a section of text. I start by typing v in standard mode, which then enables the visual mode. Then I use the arrow keys to move the cursor. This causes the text between my starting point and the current cursor location to be highlighted. Once you select a section of text like this, entering a command (e.g. search/replace) in command mode (by typing :) will only affect the selected area.

Another useful visual command is shift+v (visual line). This does the same as above, but it selects entire lines at a time instead of individual characters.

Problem

I'm relatively new to the world of Vim. I've been learning my way around it but have yet to find a practical purpose to enter visual mode. What are some scenarios when visual mode is especially useful? Are there actions that can only be performed from within visual mode?

Original source

Related problems