Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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