From de682a4f9eb96c394e59a827612353aa98a08d07 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 29 Oct 2018 09:40:20 +0100 Subject: vim-patch:fd35811ca528 Update runtime files, add Danish translations. https://github.com/vim/vim/commit/fd35811ca528de7612f9571bce20ef4c392fe5f7 --- runtime/ftplugin/vim.vim | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 59ea349710..da27e35faf 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -14,8 +14,28 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo-=C -let b:undo_ftplugin = "setl fo< isk< com< tw< commentstring< keywordprg<" - \ . "| unlet! b:match_ignorecase b:match_words b:match_skip" +if !exists('*VimFtpluginUndo') + func VimFtpluginUndo() + setl fo< isk< com< tw< commentstring< keywordprg< + if exists(b:did_add_maps) + silent! nunmap [[' + silent! vunmap [[' + silent! nunmap ]]' + silent! vunmap ]]' + silent! nunmap []' + silent! vunmap []' + silent! nunmap ][' + silent! vunmap ][' + silent! nunmap ]"' + silent! vunmap ]"' + silent! nunmap ["' + silent! vunmap ["' + endif + unlet! b:match_ignorecase b:match_words b:match_skip b:did_add_maps + endfunc +endif + +let b:undo_ftplugin = "call VimFtpluginUndo()" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting or using "o". @@ -43,6 +63,8 @@ setlocal commentstring=\"%s setlocal keywordprg=:help if !exists("no_plugin_maps") && !exists("no_vim_maps") + let b:did_add_maps = 1 + " Move around functions. nnoremap [[ m':call search('^\s*fu\%[nction]\>', "bW") vnoremap [[ m':exe "normal! gv"call search('^\s*fu\%[nction]\>', "bW") -- cgit