Skip to content

Instantly share code, notes, and snippets.

@apoo
Created April 3, 2012 23:25
Show Gist options
  • Save apoo/2296276 to your computer and use it in GitHub Desktop.
Save apoo/2296276 to your computer and use it in GitHub Desktop.
Converts Tabs to Whitespaces
In vim:
:set tabstop=4 shiftwidth=4 expandtab
:retab
Or you can set them in your vim config:
set expandtab
set tabstop=4
set shiftwidth=4
map <F2> :retab <CR> :wq! <CR>
So open a file and click on F2, it converts tabs to whitespace and save the file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment