Mercurial > ec-dotfiles
changeset 544:75c30f2b4694
Add special setting for ruby, global default to 4/noet (ruby is 2/et).
author | edogawaconan <me@myconan.net> |
---|---|
date | Tue, 24 Feb 2015 19:17:26 +0900 |
parents | 8b884bbb1d05 |
children | c9ea8dd9d382 |
files | rc/vimrc |
diffstat | 1 files changed, 17 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rc/vimrc Sat Jan 17 20:10:45 2015 +0900 +++ b/rc/vimrc Tue Feb 24 19:17:26 2015 +0900 @@ -9,8 +9,11 @@ set backspace=2 " make backspace work like most other apps set esckeys set noerrorbells -set ts=4 -set sw=2 + +set tabstop=4 +set shiftwidth=4 +set softtabstop=4 + set copyindent set title set incsearch @@ -69,6 +72,14 @@ endif if has("autocmd") + function In2() + set softtabstop=2 tabstop=2 shiftwidth=2 expandtab + endfunction + + function In4() + set softtabstop=4 tabstop=4 shiftwidth=4 noexpandtab + endfunction + augroup json_autocmd autocmd! autocmd FileType json set autoindent @@ -82,6 +93,7 @@ " reference: https://github.com/elzr/vim-json/blob/master/ftplugin/json.vim let g:vim_json_syntax_conceal = 1 augroup END + autocmd BufNewFile,BufRead *.json set filetype=json autocmd BufNewFile,BufRead *.jsonp set filetype=json autocmd BufRead,BufNewFile *.blade.php set filetype=blade @@ -93,6 +105,9 @@ autocmd BufRead,BufNewFile Gemfile set filetype=ruby autocmd BufRead,BufNewFile config.ru set filetype=ruby autocmd BufRead,BufNewFile supervisord.conf set filetype=dosini + + autocmd FileType ruby call In2() + autocmd FileType coffee call In2() endif if has('autocmd')