diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-10-29 09:40:20 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-10-29 09:43:50 +0100 |
commit | de682a4f9eb96c394e59a827612353aa98a08d07 (patch) | |
tree | 66aafbea7f7d08623a4fee18c0c15f97c16188b2 /runtime/ftplugin/vim.vim | |
parent | 5a022c71e45660dde1b9d13907c84f32564e3888 (diff) | |
download | rneovim-de682a4f9eb96c394e59a827612353aa98a08d07.tar.gz rneovim-de682a4f9eb96c394e59a827612353aa98a08d07.tar.bz2 rneovim-de682a4f9eb96c394e59a827612353aa98a08d07.zip |
vim-patch:fd35811ca528
Update runtime files, add Danish translations.
https://github.com/vim/vim/commit/fd35811ca528de7612f9571bce20ef4c392fe5f7
Diffstat (limited to 'runtime/ftplugin/vim.vim')
-rw-r--r-- | runtime/ftplugin/vim.vim | 26 |
1 files changed, 24 insertions, 2 deletions
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 <buffer> [[' + silent! vunmap <buffer> [[' + silent! nunmap <buffer> ]]' + silent! vunmap <buffer> ]]' + silent! nunmap <buffer> []' + silent! vunmap <buffer> []' + silent! nunmap <buffer> ][' + silent! vunmap <buffer> ][' + silent! nunmap <buffer> ]"' + silent! vunmap <buffer> ]"' + silent! nunmap <buffer> ["' + silent! vunmap <buffer> ["' + 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 <CR> 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 <silent><buffer> [[ m':call search('^\s*fu\%[nction]\>', "bW")<CR> vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR> |