Skip to content

Instantly share code, notes, and snippets.

@Johnytran
Last active June 17, 2016 01:12
Show Gist options
  • Save Johnytran/2406ecdc4f381ddefbc74f9d5f64d827 to your computer and use it in GitHub Desktop.
Save Johnytran/2406ecdc4f381ddefbc74f9d5f64d827 to your computer and use it in GitHub Desktop.
tab a block code
To adjust the indent on three lines:
Put the cursor anywhere in the first line.
Press V then jj to visually select the three lines.
Press > to indent (shift text one 'shiftwidth' to the right), or press < to shift left.
Press . to repeat the indent, or u to undo if you have shifted too far.
Type gv if you want to reselect the lines (not needed).
If you’re copying blocks of text around and need to align the indent of a block in its new location,
use ]p instead of just p. This aligns the pasted block with the surrounding text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment