Use setlocal in TabWidth command
This commit is contained in:
parent
f6892126df
commit
e2be2de00b
@ -86,9 +86,9 @@ command! -nargs=+ Silent execute 'silent <args>' | redraw!
|
|||||||
|
|
||||||
" Set the tab width for the current filetype
|
" Set the tab width for the current filetype
|
||||||
function! <SID>TabWidth(width)
|
function! <SID>TabWidth(width)
|
||||||
execute "set tabstop=".a:width
|
execute "setlocal tabstop=".a:width
|
||||||
execute "set shiftwidth=".a:width
|
execute "setlocal shiftwidth=".a:width
|
||||||
execute "set softtabstop=".a:width
|
execute "setlocal softtabstop=".a:width
|
||||||
echo "Tab width is now ".a:width
|
echo "Tab width is now ".a:width
|
||||||
endfunction
|
endfunction
|
||||||
command! -nargs=1 TabWidth :call <SID>TabWidth(<f-args>)
|
command! -nargs=1 TabWidth :call <SID>TabWidth(<f-args>)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user