diff --git a/plugin/functions.vim b/plugin/functions.vim index b8704dc..c7fec97 100644 --- a/plugin/functions.vim +++ b/plugin/functions.vim @@ -86,9 +86,9 @@ command! -nargs=+ Silent execute 'silent ' | redraw! " Set the tab width for the current filetype function! TabWidth(width) - execute "set tabstop=".a:width - execute "set shiftwidth=".a:width - execute "set softtabstop=".a:width + execute "setlocal tabstop=".a:width + execute "setlocal shiftwidth=".a:width + execute "setlocal softtabstop=".a:width echo "Tab width is now ".a:width endfunction command! -nargs=1 TabWidth :call TabWidth()