Training plan › Selection and objects

Visual mode

v, V and Ctrl+v: select by character, line or block.

Visual mode selects text to apply a command to it: v by character, V by line and Ctrl+v by rectangular block. Once selected, any operator acts on the selection: d deletes, y yanks, > indents, U uppercases. gv reselects the last selection.

6 steps · 5 min · 70 XP

  1. Character selection: v
  2. Line selection and indent: V >
  3. Reselect: gv
  4. Blocks: Ctrl+v
  5. Swap ends: o
  6. Operate on the selection: U

Create a free account