aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-20 17:00:29 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-20 17:00:29 +1200
commitfe1383d5e597e01dd52bf62bcc816f43ee07171e (patch)
tree7b58ae58bc7f3a1cd74d9f34661e0793c2e61872
parentRevert "Follow the manual's instructions for 't... (diff)
downloaddotfiles-fe1383d5e597e01dd52bf62bcc816f43ee07171e.tar.gz
dotfiles-fe1383d5e597e01dd52bf62bcc816f43ee07171e.zip
Use nicer patch-checking syntax
This syntax is supported for 7.4.237 and above.
-rw-r--r--vim/after/ftplugin/sh.vim4
-rw-r--r--vim/vimrc6
2 files changed, 3 insertions, 7 deletions
diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim
index e7bd21dc..9afd5086 100644
--- a/vim/after/ftplugin/sh.vim
+++ b/vim/after/ftplugin/sh.vim
@@ -23,9 +23,7 @@ let b:undo_ftplugin .= '|unlet b:current_compiler b:sh_check_compiler'
" Resort to g:is_posix for correct syntax on older runtime files
" 8.1.257 updated the runtime files to include a fix for this
-if exists('b:is_posix')
- \ && (v:version < 800
- \ || v:version == 800 && !has('patch257'))
+if exists('b:is_posix') && !has('patch-8.0.257')
let is_posix = 1
endif
diff --git a/vim/vimrc b/vim/vimrc
index 0a00b27f..7932e1de 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -31,8 +31,7 @@ endif
" Try to keep backups in one system-appropriate directory, including full
" encoded path in filename (trailing double slash) if supported (v8.1.251)
set backup
-if v:version > 801
- \ || v:version == 801 && has('patch251')
+if has('patch-8.1.251')
set backupdir^=$MYVIMRUNTIME/cache/backup//
else
set backupdir^=$MYVIMRUNTIME/cache/backup
@@ -92,8 +91,7 @@ if v:version > 703
endif
" Don't break a single space after a period, if supported (v8.1.728)
-if v:version > 801
- \ || v:version == 801 && has('patch728')
+if has('patch-8.1.728')
set formatoptions+=p
endif