From e2be2de00b6efd5c5000ffa929bd37c1013d5f6e Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 12 Apr 2017 17:02:10 +0100 Subject: [PATCH] Use setlocal in TabWidth command --- plugin/functions.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()