Skip to content

Instantly share code, notes, and snippets.

@scajanus
Created November 20, 2015 07:29
Show Gist options
  • Select an option

  • Save scajanus/a6c4c9dbe64e2f0a3602 to your computer and use it in GitHub Desktop.

Select an option

Save scajanus/a6c4c9dbe64e2f0a3602 to your computer and use it in GitHub Desktop.
Switch to 2 spaces on writing and back to 4 afterwards
au BufWritePre *.c set ts=4 noet | retab! | set ts=2 et | retab
au BufWritePost *.c set ts=2 noet | retab! | set ts=4 et | retab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment