From dae1213e57da36aaa805425636d11712c746fe49 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 28 Oct 2018 13:51:36 +0100 Subject: vim-patch:f0b03c4e98f8 Update runtime files https://github.com/vim/vim/commit/f0b03c4e98f8a7184d8b4a5d702cbcd602426923 Note: haskell changes were included in 942f3587c38a83cf6486a0b779765b54a1648493 --- runtime/ftplugin/vim.vim | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'runtime/ftplugin/vim.vim') diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index f34655f330..59ea349710 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar -" Last Change: 2017 Nov 06 +" Last Change: 2017 Dec 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -42,21 +42,23 @@ setlocal commentstring=\"%s " Prefer Vim help instead of manpages. setlocal keywordprg=:help -" Move around functions. -nnoremap [[ m':call search('^\s*fu\%[nction]\>', "bW") -vnoremap [[ m':exe "normal! gv"call search('^\s*fu\%[nction]\>', "bW") -nnoremap ]] m':call search('^\s*fu\%[nction]\>', "W") -vnoremap ]] m':exe "normal! gv"call search('^\s*fu\%[nction]\>', "W") -nnoremap [] m':call search('^\s*endf*\%[unction]\>', "bW") -vnoremap [] m':exe "normal! gv"call search('^\s*endf*\%[unction]\>', "bW") -nnoremap ][ m':call search('^\s*endf*\%[unction]\>', "W") -vnoremap ][ m':exe "normal! gv"call search('^\s*endf*\%[unction]\>', "W") - -" Move around comments -nnoremap ]" :call search('^\(\s*".*\n\)\@ -vnoremap ]" :exe "normal! gv"call search('^\(\s*".*\n\)\@ -nnoremap [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") -vnoremap [" :exe "normal! gv"call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") +if !exists("no_plugin_maps") && !exists("no_vim_maps") + " Move around functions. + nnoremap [[ m':call search('^\s*fu\%[nction]\>', "bW") + vnoremap [[ m':exe "normal! gv"call search('^\s*fu\%[nction]\>', "bW") + nnoremap ]] m':call search('^\s*fu\%[nction]\>', "W") + vnoremap ]] m':exe "normal! gv"call search('^\s*fu\%[nction]\>', "W") + nnoremap [] m':call search('^\s*endf*\%[unction]\>', "bW") + vnoremap [] m':exe "normal! gv"call search('^\s*endf*\%[unction]\>', "bW") + nnoremap ][ m':call search('^\s*endf*\%[unction]\>', "W") + vnoremap ][ m':exe "normal! gv"call search('^\s*endf*\%[unction]\>', "W") + + " Move around comments + nnoremap ]" :call search('^\(\s*".*\n\)\@ + vnoremap ]" :exe "normal! gv"call search('^\(\s*".*\n\)\@ + nnoremap [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") + vnoremap [" :exe "normal! gv"call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW") +endif " Let the matchit plugin know what items can be matched. if exists("loaded_matchit") -- cgit 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/vim.vim') 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 From 228bc4c416092eb2601329aa881915a565ee64d2 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 29 Oct 2018 09:57:50 +0100 Subject: vim-patch:d473c8c10126 Update runtime files. https://github.com/vim/vim/commit/d473c8c101262702ea9eeb14907ee20a786942b2 --- runtime/ftplugin/vim.vim | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'runtime/ftplugin/vim.vim') diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index da27e35faf..eb8061d84f 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar -" Last Change: 2017 Dec 05 +" Last Change: 2018 Aug 07 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -17,20 +17,20 @@ set cpo-=C 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 + 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 -- cgit