There are two ways to enter AST mode from normal mode: switching and “peeking”. To switch between modes, press and release the mode switch key (defaults to Esc). To peek, hold the mode switch key down while in normal mode.

The benefit of peeking is that the mode switch key can be used like a modifier key from normal mode, avoiding the overhead of a full switch-and-switch-back when you only need to issue one or two commands.


  • To wrap the selected lines (any line that the normal selection touches), use Esc+w. This will cut the selected lines and place them on the AST clipboard. Add the code you want to wrap the selection in, navigate to the line you want to insert the selection back into, and then use Alt+i to insert the AST clipboard contents. The lines will be re-indented to match the new context.

  • To move either the selected lines or any AST selection, hold Esc while dragging and dropping it.

  • To move the cursor to after the footer (closing }, </div> etc) of the block surrounding the current normal selection, use Esc+s. Other navigation commands (d, j, k) can be used similarly.