Skip to content

Commit ce8e0f7

Browse files
committed
Reformat all Vim scripts to 4-space indentation for consistency
And fix all modelines to 'et sw=4 sts=4 ts=8' accordingly.
1 parent ad536ae commit ce8e0f7

File tree

16 files changed

+980
-960
lines changed

16 files changed

+980
-960
lines changed

after/syntax/rust.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
if !get(g:, 'rust_conceal', 0) || !has('conceal') || &enc != 'utf-8'
2-
finish
2+
finish
33
endif
44

55
" For those who don't want to see `::`...
66
if get(g:, 'rust_conceal_mod_path', 0)
7-
syn match rustNiceOperator "::" conceal cchar=
7+
syn match rustNiceOperator "::" conceal cchar=
88
endif
99

1010
syn match rustRightArrowHead contained ">" conceal cchar= 
@@ -32,3 +32,5 @@ if !get(g:, 'rust_conceal_mod_path', 0)
3232
" And keep it after a colorscheme change
3333
au ColorScheme <buffer> hi! link Conceal Operator
3434
endif
35+
36+
" vim: set et sw=4 sts=4 ts=8:

autoload/cargo.vim

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ function! s:nearest_cargo(...) abort
1414

1515
let l:is_getcwd = get(a:, 1, 0)
1616
if l:is_getcwd
17-
let l:starting_path = get(a:, 2, getcwd())
17+
let l:starting_path = get(a:, 2, getcwd())
1818
else
19-
let l:starting_path = get(a:, 2, expand('%:p:h'))
19+
let l:starting_path = get(a:, 2, expand('%:p:h'))
2020
endif
2121

2222
return findfile('Cargo.toml', l:starting_path . ';')
@@ -29,13 +29,13 @@ endfunction
2929
function! cargo#nearestWorkspaceCargo(is_getcwd) abort
3030
let l:nearest = s:nearest_cargo(a:is_getcwd)
3131
while l:nearest !=# ''
32-
for l:line in readfile(l:nearest, '', 0x100)
33-
if l:line =~# '\V[workspace]'
34-
return l:nearest
35-
endif
36-
endfor
37-
let l:next = fnamemodify(l:nearest, ':p:h:h')
38-
let l:nearest = s:nearest_cargo(0, l:next)
32+
for l:line in readfile(l:nearest, '', 0x100)
33+
if l:line =~# '\V[workspace]'
34+
return l:nearest
35+
endif
36+
endfor
37+
let l:next = fnamemodify(l:nearest, ':p:h:h')
38+
let l:nearest = s:nearest_cargo(0, l:next)
3939
endwhile
4040
return ''
4141
endfunction
@@ -45,7 +45,7 @@ function! cargo#nearestRootCargo(is_getcwd) abort
4545
" regular Cargo.toml
4646
let l:workspace_cargo = cargo#nearestWorkspaceCargo(a:is_getcwd)
4747
if l:workspace_cargo !=# ''
48-
return l:workspace_cargo
48+
return l:workspace_cargo
4949
endif
5050
return s:nearest_cargo(a:is_getcwd)
5151
endfunction
@@ -84,4 +84,4 @@ function! cargo#bench(args)
8484
call cargo#cmd("bench " . a:args)
8585
endfunction
8686

87-
" vim: set noet sw=4 sts=4 ts=8:
87+
" vim: set et sw=4 sts=4 ts=8:

0 commit comments

Comments
 (0)