Indent and Dedent in Vim

Indent lines with >> and dedent them with <<. Counts or motions can expand these commands to larger ranges.

Commands you practise

>>
Indent the current line by one shiftwidth. It is the quickest way to structure lists or align nested code.
<<
Shift the current line left by one indentation level. It works instantly from anywhere on the line, keeping your code neat.

Levels

  1. Get in Line (easy): Indent the Python function body to fix the IndentationError.
  2. Config Correction (medium): Shift the misplaced dictionary keys back into alignment.
  3. Managerial Shift (hard): Align the nested class methods to use clean 4-space indentation.

Each level opens a real Neovim session in your browser with a start file and a target file. Edit one into the other in as few keystrokes as you can, then race the vimbot's solution.

Part of VimGolf.ai Premium ($10 once, lifetime). Region: Tidying Commands. See the whole skill map.