From f64486b6b6b70a05b357229f86b35ab25d92636e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 29 Jul 2019 01:51:37 +0200 Subject: vim-patch:790c18bfa5df Update runtime files https://github.com/vim/vim/commit/790c18bfa5dfeca51749b752dddc41e60cb3fa54 --- runtime/ftplugin/dune.vim | 20 +++++++++++++++++++ runtime/ftplugin/ocaml.vim | 48 ++++++++++++++++++++++++++++++++-------------- 2 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 runtime/ftplugin/dune.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/dune.vim b/runtime/ftplugin/dune.vim new file mode 100644 index 0000000000..8b1f8b4125 --- /dev/null +++ b/runtime/ftplugin/dune.vim @@ -0,0 +1,20 @@ +" Language: Dune buildsystem +" Maintainer: Markus Mottl +" Anton Kochkov +" URL: https://github.com/rgrinberg/vim-ocaml +" Last Change: +" 2018 Nov 3 - Added commentstring (Markus Mottl) +" 2017 Sep 6 - Initial version (Etienne Millon) + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin=1 + +set lisp + +" Comment string +setl commentstring=;\ %s +setl comments=:; + +setl iskeyword+=#,?,.,/ diff --git a/runtime/ftplugin/ocaml.vim b/runtime/ftplugin/ocaml.vim index 3ee7849063..e0d7efe997 100644 --- a/runtime/ftplugin/ocaml.vim +++ b/runtime/ftplugin/ocaml.vim @@ -5,12 +5,12 @@ " Pierre Vittet " Stefano Zacchiroli " Vincent Aravantinos -" URL: http://www.ocaml.info/vim/ftplugin/ocaml.vim +" URL: https://github.com/rgrinberg/vim-ocaml " Last Change: +" 2013 Oct 27 - Added commentstring (MM) " 2013 Jul 26 - load default compiler settings (MM) " 2013 Jul 24 - removed superfluous efm-setting (MM) " 2013 Jul 22 - applied fixes supplied by Hirotaka Hamada (MM) -" 2013 Mar 15 - Improved error format (MM) if exists("b:did_ftplugin") finish @@ -37,6 +37,10 @@ endif let s:cposet=&cpoptions set cpo&vim +" Comment string +setlocal comments= +setlocal commentstring=(*%s*) + " Add mappings, unless the user didn't want this. if !exists("no_plugin_maps") && !exists("no_ocaml_maps") " (un)commenting @@ -60,16 +64,39 @@ if !exists("no_plugin_maps") && !exists("no_ocaml_maps") endif " Let % jump between structure elements (due to Issac Trotts) -let b:mw = '' -let b:mw = b:mw . ',\:\:\(\\|;;\)' +let b:mw = '\:\:\(\\|;;\)' let b:mw = b:mw . ',\:\:\' -let b:mw = b:mw . ',\<\(for\|while\)\>:\:\,' +let b:mw = b:mw . ',\<\(for\|while\)\>:\:\' let b:mw = b:mw . ',\<\(object\|sig\|struct\|begin\)\>:\' let b:mw = b:mw . ',\<\(match\|try\)\>:\' let b:match_words = b:mw let b:match_ignorecase=0 +function! s:OcpGrep(bang,args) abort + let grepprg = &l:grepprg + let grepformat = &l:grepformat + let shellpipe = &shellpipe + try + let &l:grepprg = "ocp-grep -c never" + setlocal grepformat=%f:%l:%m + if &shellpipe ==# '2>&1| tee' || &shellpipe ==# '|& tee' + let &shellpipe = "| tee" + endif + execute 'grep! '.a:args + if empty(a:bang) && !empty(getqflist()) + return 'cfirst' + else + return '' + endif + finally + let &l:grepprg = grepprg + let &l:grepformat = grepformat + let &shellpipe = shellpipe + endtry +endfunction +command! -bar -bang -complete=file -nargs=+ Ocpgrep exe s:OcpGrep(, ) + " switching between interfaces (.mli) and implementations (.ml) if !exists("g:did_ocaml_switch") let g:did_ocaml_switch = 1 @@ -97,15 +124,8 @@ endif " Folding support " Get the modeline because folding depends on indentation -let s:s = line2byte(line('.'))+col('.')-1 -if search('^\s*(\*:o\?caml:') - let s:modeline = getline(".") -else - let s:modeline = "" -endif -if s:s > 0 - exe 'goto' s:s -endif +let lnum = search('^\s*(\*:o\?caml:', 'n') +let s:modeline = lnum? getline(lnum): "" " Get the indentation params let s:m = matchstr(s:modeline,'default\s*=\s*\d\+') -- cgit From c8f34a9a3efa6e260e97c9c064f7e6cb8a099aa9 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 29 Jul 2019 02:37:38 +0200 Subject: vim-patch:d47d52232bf2 Update runtime files. https://github.com/vim/vim/commit/d47d52232bf21036c5c89081458be7eaf2630d24 --- runtime/ftplugin/xml.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/xml.vim b/runtime/ftplugin/xml.vim index 573a6ba441..1d43521155 100644 --- a/runtime/ftplugin/xml.vim +++ b/runtime/ftplugin/xml.vim @@ -1,8 +1,8 @@ " Vim filetype plugin file -" Language: xml -" Maintainer: Christian Brabandt -" Last Changed: May 08th, 2018 -" Repository: https://github.com/chrisbra/vim-xml-ftplugin +" Language: xml +" Maintainer: Christian Brabandt +" Last Changed: Dec 07th, 2018 +" Repository: https://github.com/chrisbra/vim-xml-ftplugin " Previous Maintainer: Dan Sharp " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin -- cgit From 4cab90ad8c2f82dbdea71cf240384c5c3ae92d4d Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 29 Jul 2019 02:54:47 +0200 Subject: vim-patch:c8c884926750 Update runtime files. https://github.com/vim/vim/commit/c8c8849267503b2d2d6d821047ee8619c7821728 --- runtime/ftplugin/cfg.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 runtime/ftplugin/cfg.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/cfg.vim b/runtime/ftplugin/cfg.vim new file mode 100644 index 0000000000..b5835ba7a9 --- /dev/null +++ b/runtime/ftplugin/cfg.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: Configuration File +" Maintainer: Christian Brabandt +" Latest Revision: 2018-12-24 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl cms< fo<" + +setlocal commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save -- cgit From ef1f1907cc4f9c74fc415d7411aacf8c61a4a38f Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 29 Jul 2019 02:59:32 +0200 Subject: vim-patch:4c05fa08c973 Update runtime files https://github.com/vim/vim/commit/4c05fa08c9739e307ddc88ac91ba6d208f1fd68e --- runtime/ftplugin/help.vim | 2 +- runtime/ftplugin/logcheck.vim | 10 +++++----- runtime/ftplugin/rst.vim | 7 ++++++- 3 files changed, 12 insertions(+), 7 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/help.vim b/runtime/ftplugin/help.vim index 0f448bd306..a6a6652b2f 100644 --- a/runtime/ftplugin/help.vim +++ b/runtime/ftplugin/help.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Vim help file " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Latest Revision: 2018-12-29 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/logcheck.vim b/runtime/ftplugin/logcheck.vim index 7d4671d875..9d664b2d09 100644 --- a/runtime/ftplugin/logcheck.vim +++ b/runtime/ftplugin/logcheck.vim @@ -1,16 +1,16 @@ " Vim filetype plugin file " Language: Logcheck -" Maintainer: Debian Vim Maintainers -" Last Change: 2012 Jan 15 +" Maintainer: Debian Vim Maintainers +" Last Change: 2018 Dec 27 " License: Vim License -" URL: http://hg.debian.org/hg/pkg-vim/vim/file/unstable/runtime/ftplugin/logcheck.vim +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/logcheck.vim -if exists("b:did_ftplugin") +if exists('b:did_ftplugin') finish endif let b:did_ftplugin = 1 -let b:undo_ftplugin = "setl fo<" +let b:undo_ftplugin = 'setl fo<' " Do not hard-wrap non-comment lines since each line is a self-contained " regular expression diff --git a/runtime/ftplugin/rst.vim b/runtime/ftplugin/rst.vim index 9d737cde44..8ab56b052a 100644 --- a/runtime/ftplugin/rst.vim +++ b/runtime/ftplugin/rst.vim @@ -3,7 +3,7 @@ " Maintainer: Marshall Ward " Original Maintainer: Nikolai Weibull " Website: https://github.com/marshallward/vim-restructuredtext -" Latest Revision: 2018-01-07 +" Latest Revision: 2018-12-29 if exists("b:did_ftplugin") finish @@ -13,6 +13,11 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim +"Disable folding +if !exists('g:rst_fold_enabled') + let g:rst_fold_enabled = 0 +endif + let b:undo_ftplugin = "setl com< cms< et< fo<" setlocal comments=fb:.. commentstring=..\ %s expandtab -- cgit From 6fed5051008ec464316e6045cb7a900a329929d3 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Mon, 29 Jul 2019 03:03:53 +0200 Subject: vim-patch:d09091d4955c Update runtime files. https://github.com/vim/vim/commit/d09091d4955c5f41de69928f2db85611ed54ed23 --- runtime/ftplugin/bash.vim | 31 ++++++++++++++ runtime/ftplugin/eruby.vim | 34 ++++++++++++++- runtime/ftplugin/ruby.vim | 100 ++++++++++++++++++++++++--------------------- runtime/ftplugin/text.vim | 7 ++-- 4 files changed, 121 insertions(+), 51 deletions(-) create mode 100644 runtime/ftplugin/bash.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/bash.vim b/runtime/ftplugin/bash.vim new file mode 100644 index 0000000000..a3d01fc2ad --- /dev/null +++ b/runtime/ftplugin/bash.vim @@ -0,0 +1,31 @@ +" Vim filetype plugin file +" Language: bash +" Maintainer: Bram Moolenaar +" Last Changed: 2019 Jan 12 +" +" This is not a real filetype plugin. It allows for someone to set 'filetype' +" to "bash" in the modeline, and gets the effect of filetype "sh" with +" b:is_bash set. Idea from Mahmode Al-Qudsi. + +if exists("b:did_ftplugin") + finish +endif + +let b:is_bash = 1 +if exists("b:is_sh") + unlet b:is_sh +endif +if exists("b:is_kornshell") + unlet b:is_kornshell +endif + +" Setting 'filetype' here directly won't work, since we are being invoked +" through an autocommand. Do it later, on the BufWinEnter event. +augroup bash_filetype + au BufWinEnter * call SetBashFt() +augroup END + +func SetBashFt() + au! bash_filetype + set ft=sh +endfunc diff --git a/runtime/ftplugin/eruby.vim b/runtime/ftplugin/eruby.vim index 32f3fb868f..3c18bada78 100644 --- a/runtime/ftplugin/eruby.vim +++ b/runtime/ftplugin/eruby.vim @@ -3,6 +3,7 @@ " Maintainer: Tim Pope " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns +" Last Change: 2019 Jan 06 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -27,7 +28,7 @@ elseif !exists("b:eruby_subtype") let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') if b:eruby_subtype == '' - let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$') + let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\|\.example\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$') endif if b:eruby_subtype == 'rhtml' let b:eruby_subtype = 'html' @@ -45,7 +46,7 @@ elseif !exists("b:eruby_subtype") endif endif -if exists("b:eruby_subtype") && b:eruby_subtype != '' +if exists("b:eruby_subtype") && b:eruby_subtype != '' && b:eruby_subtype !=? 'eruby' exe "runtime! ftplugin/".b:eruby_subtype.".vim ftplugin/".b:eruby_subtype."_*.vim ftplugin/".b:eruby_subtype."/*.vim" else runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim @@ -66,6 +67,21 @@ if exists("b:match_words") unlet b:match_words endif +let s:cfilemap = v:version >= 704 ? maparg('', 'c', 0, 1) : {} +if !get(s:cfilemap, 'buffer') || !s:cfilemap.expr || s:cfilemap.rhs =~# 'ErubyAtCursor()' + let s:cfilemap = {} +endif +if !has_key(s:cfilemap, 'rhs') + let s:cfilemap.rhs = "substitute(&l:inex =~# '\\' && len(expand('')) ? eval(substitute(&l:inex, '\\', '\\=string(expand(\"\"))', 'g')) : '', '^$', \"\\022\\006\",'')" +endif +let s:ctagmap = v:version >= 704 ? maparg('', 'c', 0, 1) : {} +if !get(s:ctagmap, 'buffer') || !s:ctagmap.expr || s:ctagmap.rhs =~# 'ErubyAtCursor()' + let s:ctagmap = {} +endif +let s:include = &l:include +let s:path = &l:path +let s:suffixesadd = &l:suffixesadd + runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim let b:did_ftplugin = 1 @@ -80,6 +96,15 @@ if exists("b:match_words") let s:match_words = b:match_words . ',' . s:match_words endif +if len(s:include) + let &l:include = s:include +endif +let &l:path = s:path . (s:path =~# ',$\|^$' ? '' : ',') . &l:path +let &l:suffixesadd = s:suffixesadd . (s:suffixesadd =~# ',$\|^$' ? '' : ',') . &l:suffixesadd +exe 'cmap