aboutsummaryrefslogtreecommitdiff
path: root/vim/config/format.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-30 22:33:20 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-30 22:33:20 +1300
commitd11ee46548f7c71206fe070e7880760268f78324 (patch)
tree75aeb1f91b45afcb61cf81b19067672d33ca5f3b /vim/config/format.vim
parentSwitch on local formatoptions setting, not global (diff)
downloaddotfiles-d11ee46548f7c71206fe070e7880760268f78324.tar.gz
dotfiles-d11ee46548f7c71206fe070e7880760268f78324.zip
Use explicit case-sensitive 'formatoptions' match
Per Google's VimScript style recommendations <https://google.github.io/styleguide/vimscriptguide.xml>: > Always use case-explicit operators for strings (=~# and =~?, never > =~).
Diffstat (limited to 'vim/config/format.vim')
-rw-r--r--vim/config/format.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/vim/config/format.vim b/vim/config/format.vim
index f0cb6af5..80e52332 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 = (&l:formatoptions =~ a:flag) ? '-=' : '+='
+ let l:operation = (&l:formatoptions =~# a:flag) ? '-=' : '+='
silent! exec 'setlocal formatoptions' . l:operation . a:flag
setlocal formatoptions?
endfunction