aboutsummaryrefslogtreecommitdiffstats
path: root/ftplugin/rust.vim
blob: 08601f62cf8a5e8c581859295cc19b25a0fa8efb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
" Rust vim settings

if exists('b:did_ftplugin')
	unlet b:did_ftplugin
endif


" Indentation
setlocal expandtab
setlocal tabstop=4
setlocal softtabstop=4
setlocal shiftwidth=4


" Comment string
setlocal commentstring=//\ %s


" Add a trailing comma when expanding elements to multiple lines
let b:argwrap_tail_comma = 1


nnoremap <buffer>Zr :!cargo run<CR>
nnoremap <buffer>Zb :!cargo build<CR>