aboutsummaryrefslogtreecommitdiff
path: root/vim/config/format.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-06 09:51:09 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-06 09:51:09 +1300
commit9927b230dd5ae7004f4d14ea9f684d06cd11a856 (patch)
tree89411d24bbfbd4058cb78b9e24cc177530659ced /vim/config/format.vim
parentDon't overwrite plugin-specified user commands (diff)
downloaddotfiles-9927b230dd5ae7004f4d14ea9f684d06cd11a856.tar.gz
dotfiles-9927b230dd5ae7004f4d14ea9f684d06cd11a856.zip
Don't use VimL ==# for number comparisons
The Google VimScript Guide says: <https://google.github.io/styleguide/vimscriptfull.xml#Portability> > Always use case-explicit operators for strings (=~# and =~?, never =~). > > This also applies to !~ == != > >= < and <= > This only applies for strings. == and >= are fine for numbers, but ==# > and >=# must be used for strings.
Diffstat (limited to 'vim/config/format.vim')
-rw-r--r--vim/config/format.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/vim/config/format.vim b/vim/config/format.vim
index 54d46dc2..1f24ee56 100644
--- a/vim/config/format.vim
+++ b/vim/config/format.vim
@@ -5,7 +5,7 @@ if has('eval')
" Figure out if we have the 'j' flag for 'formatoptions', to automatically
" delete comment leaders when joining lines; keep it in a script variable
let s:formatoptions_has_j = v:version > 703
- \ || v:version ==# 703 && has('patch541')
+ \ || v:version == 703 && has('patch541')
" If we do have 'j', default to setting it
if s:formatoptions_has_j
@@ -38,7 +38,7 @@ if has('eval')
" 'textwidth' wrapping to the current paragraph on every insertion or
" deletion; keep in a script variable
let s:formatoptions_has_a = v:version > 610
- \ || v:version ==# 610 && has('patch142')
+ \ || v:version == 610 && has('patch142')
" 'a' needs testing
if s:formatoptions_has_a