Skip to content

Instantly share code, notes, and snippets.

@Takazudo
Created February 23, 2012 18:33
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 Takazudo/1894248 to your computer and use it in GitHub Desktop.
Save Takazudo/1894248 to your computer and use it in GitHub Desktop.
toggle indent
"---------------------------------------------------------------------------
" tab setting toggle macro
fun! g:Ind2sp()
setlocal softtabstop=2
setlocal shiftwidth=2
setlocal expandtab
endfun
fun! g:Ind4sp()
setlocal softtabstop=4
setlocal shiftwidth=4
setlocal expandtab
endfun
fun! g:Ind1tab()
setlocal softtabstop=4
setlocal shiftwidth=4
setlocal noexpandtab
endfun
com! Ind2sp call g:Ind2sp()
com! Ind4sp call g:Ind4sp()
com! Ind1tab call g:Ind1tab()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment