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
|
augroup rbindent
|
||||||
autocmd!
|
autocmd!
|
||||||
au BufNewFile,BufRead *.rb :set noexpandtab
|
au BufNewFile,BufRead *.rb :set noexpandtab :retab!
|
||||||
au BufNewFile,BufRead *.rb :retab!
|
|
||||||
|
|
||||||
au BufWritePre *.rb :set expandtab
|
au BufWritePre *.rb :let ts = &tabstop | set expandtab | set tabstop=2 | retab | let &tabstop=ts
|
||||||
au BufWritePre *.rb :set tabstop=2 " TODO: find a way to change it back to whatever it was before
|
|
||||||
au BufWritePre *.rb :retab
|
|
||||||
|
|
||||||
au BufWritepost *.rb :set noexpandtab
|
au BufWritepost *.rb :set noexpandtab :silent! :undo :normal <S-tab>
|
||||||
au BufWritepost *.rb :silent! :undo :normal <S-tab>
|
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" --- Lua Stuff ---
|
" --- Lua Stuff ---
|
||||||
|
|
Loading…
Reference in a new issue