Skip to content

Instantly share code, notes, and snippets.

@miraleung
Forked from ericdouglas/super-tip.txt
Created March 10, 2019 02:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miraleung/06910db42735b4ff7607e76d5d46fff0 to your computer and use it in GitHub Desktop.
Save miraleung/06910db42735b4ff7607e76d5d46fff0 to your computer and use it in GitHub Desktop.
Change 4 spaces to 2 spaces indentation and change tab to spaces - Vim tip
// 4 spaces to 2 spaces
%s;^\(\s\+\);\=repeat(' ', len(submatch(0))/2);g
// Tab to 2 spaces
:%s/\t/ /g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment