diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-30 22:32:11 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-30 22:32:11 +1300 |
commit | 610fca5da8e7481a0ac09df9f3c21bde586623b3 (patch) | |
tree | 48b61a44d8c7838a7f0471e83d457050200bd2ab /vim/config/format.vim | |
parent | Append "usetab" to `switchbuf`, not switched set (diff) | |
download | dotfiles-610fca5da8e7481a0ac09df9f3c21bde586623b3.tar.gz dotfiles-610fca5da8e7481a0ac09df9f3c21bde586623b3.zip |
Switch on local formatoptions setting, not global
The actual option settings performed by the function are local, so the
test should be, too.
Diffstat (limited to 'vim/config/format.vim')
-rw-r--r-- | vim/config/format.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vim/config/format.vim b/vim/config/format.vim index b307c4b6..f0cb6af5 100644 --- a/vim/config/format.vim +++ b/vim/config/format.vim @@ -21,7 +21,7 @@ endif " if has('eval') function! s:ToggleFormatFlag(flag) - let l:operation = (&formatoptions =~ a:flag) ? '-=' : '+=' + let l:operation = (&l:formatoptions =~ a:flag) ? '-=' : '+=' silent! exec 'setlocal formatoptions' . l:operation . a:flag setlocal formatoptions? endfunction |