aboutsummaryrefslogtreecommitdiff
path: root/vim/after
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-16 15:06:59 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-16 15:06:59 +1200
commit3e4458b70c8670d5a8c98ef245edd3611bd39354 (patch)
tree3602dc8129cb8859651e013e6a68dc97f9bca8fb /vim/after
parentAdd a comment (diff)
downloaddotfiles-3e4458b70c8670d5a8c98ef245edd3611bd39354.tar.gz
dotfiles-3e4458b70c8670d5a8c98ef245edd3611bd39354.zip
Qualify unmap with version number guard
Diffstat (limited to 'vim/after')
-rw-r--r--vim/after/ftplugin/vim.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim
index bfac623a..570a9443 100644
--- a/vim/after/ftplugin/vim.vim
+++ b/vim/after/ftplugin/vim.vim
@@ -19,7 +19,9 @@ nnoremap <buffer> <LocalLeader>K
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>K'
" Get rid of the core ftplugin's square-bracket maps on unload
-let b:undo_ftplugin .= '|nunmap <buffer> [['
+" 8.1.273 updated the runtime files to include a fix for this
+if v:version < 801 || v:version == 801 && !has('patch273')
+ let b:undo_ftplugin .= '|nunmap <buffer> [['
\ . '|vunmap <buffer> [['
\ . '|nunmap <buffer> ]]'
\ . '|vunmap <buffer> ]]'
@@ -31,3 +33,4 @@ let b:undo_ftplugin .= '|nunmap <buffer> [['
\ . '|vunmap <buffer> ]"'
\ . '|nunmap <buffer> ["'
\ . '|vunmap <buffer> ["'
+endif