Skip to content

Instantly share code, notes, and snippets.

@tinco
Created July 8, 2010 19:39
Show Gist options
  • Save tinco/468480 to your computer and use it in GitHub Desktop.
Save tinco/468480 to your computer and use it in GitHub Desktop.
command -nargs=1 IndentStyle call IndentStyle("<args>")
let g:IndentStyle = "none"
fun IndentStyle(style)
if a:style == "ruby"
"ruby style:
set tabstop=2
set shiftwidth=2
set expandtab
let g:IndentStyle="ruby"
endif
if a:style == "phusion"
"phusion style"
set tabstop=2
set shiftwidth=2
set noexpandtab
let g:IndentStyle="phusion"
endif
endf
autocmd BufWinEnter * call IndentStyle(g:IndentStyle)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment