Skip to content

Instantly share code, notes, and snippets.

@tmm1
Forked from alloy/gist:7527832
Created November 26, 2013 10:07
Show Gist options
  • Save tmm1/7656047 to your computer and use it in GitHub Desktop.
Save tmm1/7656047 to your computer and use it in GitHub Desktop.
" These VIM rules match the MRI C indentation rules.
"
" To enable use of this project specific config, add the following to your
" ~/.vimrc:
"
" " Enable per-directory .vimrc files
" set exrc
" " Disable unsafe commands in local .vimrc files
" set secure
function! MRIIndent()
setlocal cindent
setlocal noexpandtab
setlocal shiftwidth=4
setlocal softtabstop=4
setlocal tabstop=8
setlocal textwidth=80
" Ensure function return types are not indented
setlocal cinoptions=(0,t0
endfunction
function! MRIChangeLog()
let $TZ='japan'
let g:changelog_dateformat = "%c"
let g:changelog_username = "Aman Gupta <ruby@tmm1.net>"
endfunction
autocmd Filetype c,cpp,yacc call MRIIndent()
autocmd Filetype ChangeLog call MRIChangeLog()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment