Streamlined ruby autoretabbing
This commit is contained in:
parent
ebf84e7d34
commit
18335cc569
1 changed files with 3 additions and 7 deletions
10
vimrc
10
vimrc
|
@ -419,15 +419,11 @@ endfunction
|
|||
|
||||
augroup rbindent
|
||||
autocmd!
|
||||
au BufNewFile,BufRead *.rb :set noexpandtab
|
||||
au BufNewFile,BufRead *.rb :retab!
|
||||
au BufNewFile,BufRead *.rb :set noexpandtab :retab!
|
||||
|
||||
au BufWritePre *.rb :set expandtab
|
||||
au BufWritePre *.rb :set tabstop=2 " TODO: find a way to change it back to whatever it was before
|
||||
au BufWritePre *.rb :retab
|
||||
au BufWritePre *.rb :let ts = &tabstop | set expandtab | set tabstop=2 | retab | let &tabstop=ts
|
||||
|
||||
au BufWritepost *.rb :set noexpandtab
|
||||
au BufWritepost *.rb :silent! :undo :normal <S-tab>
|
||||
au BufWritepost *.rb :set noexpandtab :silent! :undo :normal <S-tab>
|
||||
augroup END
|
||||
|
||||
" --- Lua Stuff ---
|
||||
|
|
Loading…
Reference in a new issue