Use setlocal in TabWidth command

This commit is contained in:
Kenneth Benzie 2017-04-12 17:02:10 +01:00
parent f6892126df
commit e2be2de00b

View File

@ -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>)