Created
September 16, 2012 16:11
-
-
Save j-v/3733013 to your computer and use it in GitHub Desktop.
Fix my screwed up Python indentation in 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
" initially i was using 3-space (shiftwidth=3) indentation with noexpandtab, and tabstop=8, the default | |
" this switches it to proper 4-space indentation with expandtab | |
" convert tabs to spaces | |
set tabstop=8 | |
set shiftwidth=3 | |
set expandtab | |
retab | |
" convert spaces to tabs | |
set tabstop=3 | |
set noexpandtab | |
%retab! | |
" final convert tabs back to spaces | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
retab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment