Skip to content

Commit 4c1fdd0

Browse files
committed
vim: set Rust tab conventions
1 parent 935da07 commit 4c1fdd0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/etc/vim/ftplugin/rust.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ setlocal formatoptions-=t formatoptions+=croqnl
3131
" j was only added in 7.3.541, so stop complaints about its nonexistence
3232
silent! setlocal formatoptions+=j
3333

34+
" smartindent will be overridden by indentexpr if filetype indent is on, but
35+
" otherwise it's better than nothing.
36+
setlocal smartindent nocindent
37+
38+
setlocal tabstop=4 shiftwidth=4 expandtab
39+
3440
" This includeexpr isn't perfect, but it's a good start
3541
setlocal includeexpr=substitute(v:fname,'::','/','g')
3642

0 commit comments

Comments
 (0)