diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-30 22:33:20 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-30 22:33:20 +1300 |
commit | d11ee46548f7c71206fe070e7880760268f78324 (patch) | |
tree | 75aeb1f91b45afcb61cf81b19067672d33ca5f3b | |
parent | Switch on local formatoptions setting, not global (diff) | |
download | dotfiles-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
> =~).
-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 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 |