Created
November 13, 2018 18:04
-
-
Save scottymeyers/5e34b02db643362eece3ffede3a10f80 to your computer and use it in GitHub Desktop.
Useful VIM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// convert 4 spaces to 2 | |
:%s;^\(\s\+\);\=repeat(' ', len(submatch(0))/2);g | |
// convert tab to 2 spaces | |
:%s/\t/ /g | |
// delete trailing whitespace | |
:%s/\s\+$//e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment