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 ++++++++++++++++++---------------- runtime/ftplugin/zimbu.vim | 8 +++++--- 2 files changed, 23 insertions(+), 19 deletions(-) (limited to 'runtime/ftplugin') 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") diff --git a/runtime/ftplugin/zimbu.vim b/runtime/ftplugin/zimbu.vim index 558aea7df0..24674776cb 100644 --- a/runtime/ftplugin/zimbu.vim +++ b/runtime/ftplugin/zimbu.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Zimbu " Maintainer: Bram Moolenaar -" Last Change: 2012 Sep 08 +" Last Change: 2017 Dec 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -135,8 +135,10 @@ iabbr until GCUpperSpace("until") iabbr while GCUpperSpace("while") iabbr repeat GCUpper("repeat") -nnoremap [[ m`:call ZimbuGoStartBlock() -nnoremap ]] m`:call ZimbuGoEndBlock() +if !exists("no_plugin_maps") && !exists("no_zimbu_maps") + nnoremap [[ m`:call ZimbuGoStartBlock() + nnoremap ]] m`:call ZimbuGoEndBlock() +endif " Using a function makes sure the search pattern is restored func! ZimbuGoStartBlock() -- cgit