From b1fed1ada9635f762cb9b3a7f2fe38df6f166df4 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 22 Apr 2021 23:08:48 -0400 Subject: vim-patch:5be4ceecea55 Update runtime files. https://github.com/vim/vim/commit/5be4ceecea5520265066eac972460ebb1cdf05e7 --- runtime/ftplugin/bash.vim | 19 ++++--------------- runtime/ftplugin/matlab.vim | 5 +++-- 2 files changed, 7 insertions(+), 17 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/bash.vim b/runtime/ftplugin/bash.vim index a3d01fc2ad..7bd9787b6c 100644 --- a/runtime/ftplugin/bash.vim +++ b/runtime/ftplugin/bash.vim @@ -11,21 +11,10 @@ if exists("b:did_ftplugin") finish endif +unlet! b:is_sh +unlet! b:is_kornshell 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 +runtime! ftplugin/sh.vim ftplugin/sh_*.vim ftplugin/sh/*.vim -func SetBashFt() - au! bash_filetype - set ft=sh -endfunc +" vim: ts=8 diff --git a/runtime/ftplugin/matlab.vim b/runtime/ftplugin/matlab.vim index 205111c3c2..a1a282f19e 100644 --- a/runtime/ftplugin/matlab.vim +++ b/runtime/ftplugin/matlab.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: matlab " Maintainer: Jake Wasserman -" Last Changed: 2014 Dec 30 +" Last Change: 2019 Sep 27 " Contributors: " Charles Campbell @@ -24,8 +24,9 @@ endif setlocal suffixesadd=.m setlocal suffixes+=.asv +setlocal commentstring=%\ %s -let b:undo_ftplugin = "setlocal suffixesadd< suffixes< " +let b:undo_ftplugin = "setlocal suffixesadd< suffixes< commentstring< " \ . "| unlet! b:match_words" let &cpo = s:save_cpo -- cgit From 233292b0ba9fb5d60ef7b2973c3a778e9c12be0c Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 23 Apr 2021 20:52:29 -0400 Subject: vim-patch:96f45c0b6fc9 Update runtime files https://github.com/vim/vim/commit/96f45c0b6fc9e9d404e6805593ed1e0e6795e470 Omit de.po changes. Same reason as before: too much and I don't understand the language. --- runtime/ftplugin/meson.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 runtime/ftplugin/meson.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/meson.vim b/runtime/ftplugin/meson.vim new file mode 100644 index 0000000000..e432ebf196 --- /dev/null +++ b/runtime/ftplugin/meson.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: meson +" License: VIM License +" Original Author: Laurent Pinchart +" Last Change: 2018 Nov 27 + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 +let s:keepcpo= &cpo +set cpo&vim + +setlocal commentstring=#\ %s +setlocal comments=:# + +setlocal shiftwidth=2 +setlocal softtabstop=2 + +let &cpo = s:keepcpo +unlet s:keepcpo -- cgit From 52564c9aa267ba3fd1c70eef7dd358d002e2c8e5 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 24 Apr 2021 15:38:31 -0400 Subject: vim-patch:09c6f265b210 Update runtime files. https://github.com/vim/vim/commit/09c6f265b21065ffa9437837b1d0955137175e45 Omit getmousepos(). Patch v8.1.2304 is not ported yet. --- runtime/ftplugin/j.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/j.vim b/runtime/ftplugin/j.vim index 9dc1692534..3cd0cb8e2b 100644 --- a/runtime/ftplugin/j.vim +++ b/runtime/ftplugin/j.vim @@ -1,8 +1,8 @@ " Vim filetype plugin " Language: J -" Maintainer: David Bürgin <676c7473@gmail.com> -" URL: https://github.com/glts/vim-j -" Last Change: 2015-09-27 +" Maintainer: David Bürgin +" URL: https://gitlab.com/glts/vim-j +" Last Change: 2015-10-27 if exists('b:did_ftplugin') finish @@ -25,7 +25,7 @@ setlocal include=\\v^\\s*(load\|require)\\s*'\\zs\\f+\\ze' setlocal includeexpr=substitute(substitute(tr(v:fname,'\\','/'),'\\v^[^~][^/.]*(/[^/.]+)$','&\\1',''),'\\v^\\~[^/]+/','','') setlocal suffixesadd=.ijs -let b:undo_ftplugin = 'setlocal matchpairs< formatoptions< commentstring< comments< iskeyword< path< include< includeexpr< suffixesadd<' +let b:undo_ftplugin = 'setlocal suffixesadd< includeexpr< include< path< matchpairs< formatoptions< commentstring< comments< iskeyword<' " Section movement with ]] ][ [[ []. The start/end patterns below are amended " inside the function in order to avoid matching on the current cursor line. -- cgit From d1231d4f8eb3ad1e6fdf62bbf14644bfb831d943 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 24 Apr 2021 16:15:57 -0400 Subject: vim-patch:403f3eb4c189 Update runtime files. https://github.com/vim/vim/commit/403f3eb4c1890826a5b3b5922c0e8e45be79a476 Port sr.po changes, done by vim-patch.sh. No way I'm manually porting the rest. --- runtime/ftplugin/scheme.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/scheme.vim b/runtime/ftplugin/scheme.vim index 62fd327e07..5778594c41 100644 --- a/runtime/ftplugin/scheme.vim +++ b/runtime/ftplugin/scheme.vim @@ -1,6 +1,6 @@ " Vim filetype plugin file " Language: Scheme (R7RS) -" Last Change: 2018-03-05 +" Last Change: 2019 Nov 18 " Author: Evan Hanson " Maintainer: Evan Hanson " Previous Maintainer: Sergey Khorev @@ -21,7 +21,7 @@ setl iskeyword=33,35-39,42-43,45-58,60-90,94,95,97-122,126 let b:undo_ftplugin = 'setl lisp< comments< commentstring< define< iskeyword<' -setl lispwords=case +setl lispwords+=case setl lispwords+=define setl lispwords+=define-record-type setl lispwords+=define-syntax -- cgit From 8e782f612487018abe9067f38658a16beff8e8e0 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 24 Apr 2021 18:32:44 -0400 Subject: vim-patch:4ceaa3a6e0b8 Update a few runtime files https://github.com/vim/vim/commit/4ceaa3a6e0b8cb2994c303041aedcbb60527cd61 Omit de.po. --- runtime/ftplugin/jproperties.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/jproperties.vim b/runtime/ftplugin/jproperties.vim index 5bdd8a7cf3..c0e7800058 100644 --- a/runtime/ftplugin/jproperties.vim +++ b/runtime/ftplugin/jproperties.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Java properties file -" Maintainer: David Bürgin <676c7473@gmail.com> -" Last Change: 2013-11-19 +" Maintainer: None +" Last Change: 2019 Dec 01 if exists("b:did_ftplugin") finish -- cgit From 3e47e529b0354dbd665202bbc4f485a5160206bf Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 24 Apr 2021 18:38:10 -0400 Subject: vim-patch:c08ee7476b19 Update runtime files. https://github.com/vim/vim/commit/c08ee7476b19f9b4de5df287797af87c4e3fba0a --- runtime/ftplugin/git.vim | 4 ++-- runtime/ftplugin/haml.vim | 6 ++++-- runtime/ftplugin/sass.vim | 20 +++++++++++++++++--- 3 files changed, 23 insertions(+), 7 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/git.vim b/runtime/ftplugin/git.vim index b3d5cff804..75b20f021e 100644 --- a/runtime/ftplugin/git.vim +++ b/runtime/ftplugin/git.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: generic git output " Maintainer: Tim Pope -" Last Change: 2016 Aug 29 +" Last Change: 2019 Dec 05 " Only do this when not done yet for this buffer if (exists("b:did_ftplugin")) @@ -10,7 +10,7 @@ endif let b:did_ftplugin = 1 if !exists('b:git_dir') - if expand('%:p') =~# '[\/]\.git[\/]modules[\/]' + if expand('%:p') =~# '[\/]\.git[\/]modules[\/]\|:[\/][\/]\|^\a\a\+:' " Stay out of the way elseif expand('%:p') =~# '[\/]\.git[\/]worktrees' let b:git_dir = matchstr(expand('%:p'),'.*\.git[\/]worktrees[\/][^\/]\+\>') diff --git a/runtime/ftplugin/haml.vim b/runtime/ftplugin/haml.vim index e74530b556..6f30169958 100644 --- a/runtime/ftplugin/haml.vim +++ b/runtime/ftplugin/haml.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Haml " Maintainer: Tim Pope -" Last Change: 2016 Aug 29 +" Last Change: 2019 Dec 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -37,6 +37,8 @@ endif runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim let b:did_ftplugin = 1 +let &l:define .= empty(&l:define ? '' : '\|') . '^\s*\%(%\w*\)\=\%(\.[[:alnum:]_-]\+\)*#' + " Combine the new set of values with those previously included. if exists("b:undo_ftplugin") let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin @@ -60,7 +62,7 @@ endif setlocal comments= commentstring=-#\ %s -let b:undo_ftplugin = "setl cms< com< " +let b:undo_ftplugin = "setl def< cms< com< " \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin let &cpo = s:save_cpo diff --git a/runtime/ftplugin/sass.vim b/runtime/ftplugin/sass.vim index d6909e7ad5..9ce446137a 100644 --- a/runtime/ftplugin/sass.vim +++ b/runtime/ftplugin/sass.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Sass " Maintainer: Tim Pope -" Last Change: 2016 Aug 29 +" Last Change: 2019 Dec 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -13,11 +13,25 @@ let b:undo_ftplugin = "setl com< cms< def< inc< inex< ofu< sua<" setlocal comments=:// setlocal commentstring=//\ %s -setlocal define=^\\s*\\%(@mixin\\\|=\\) -setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','') +setlocal includeexpr=SassIncludeExpr(v:fname) setlocal omnifunc=csscomplete#CompleteCSS setlocal suffixesadd=.sass,.scss,.css +if &filetype =~# '\' + setlocal iskeyword+=- + setlocal iskeyword+=$ + setlocal iskeyword+=% + let b:undo_ftplugin .= ' isk<' +endif +let &l:define = '^\C\v\s*%(\@function|\@mixin|\=)|^\s*%(\$[[:alnum:]-]+:|[%.][:alnum:]-]+\s*%(\{|$))@=' let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\=' +function! SassIncludeExpr(file) abort + let partial = substitute(a:file, '\%(.*/\|^\)\zs', '_', '') + if !empty(findfile(partial)) + return partial + endif + return a:file +endfunction + " vim:set sw=2: -- cgit From f19c896e9d2ed2ed5970de255f84e0120c36a76e Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 24 Apr 2021 20:51:31 -0400 Subject: vim-patch:2ed639abdc40 Update a few runtime files. https://github.com/vim/vim/commit/2ed639abdc4000436115f378e28320b7bee38a6e --- runtime/ftplugin/ruby.vim | 49 ++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 20 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/ruby.vim b/runtime/ftplugin/ruby.vim index 054c35e5fa..b4a8eaa0d8 100644 --- a/runtime/ftplugin/ruby.vim +++ b/runtime/ftplugin/ruby.vim @@ -3,7 +3,7 @@ " Maintainer: Tim Pope " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns -" Last Change: 2019 Jan 06 +" Last Change: 2019 Nov 06 if (exists("b:did_ftplugin")) finish @@ -24,20 +24,20 @@ if exists("loaded_matchit") && !exists("b:match_words") let b:match_ignorecase = 0 let b:match_words = - \ '\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|def\|begin\)\>=\@!' . + \ '{\|\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|def\|=\@=\@!' . \ ':' . \ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' . \ ':' . - \ '\%(^\|[^.\:@$]\)\@<=\' . - \ ',{:},\[:\],(:)' + \ '}\|\%(^\|[^.\:@$=]\)\@<=\' . + \ ',^=begin\>:^=end\>,' . + \ ',\[:\],(:)' let b:match_skip = \ "synIDattr(synID(line('.'),col('.'),0),'name') =~ '" . - \ "\\'" endif @@ -87,7 +87,7 @@ endfunction function! s:build_path(path) abort let path = join(map(copy(a:path), 'v:val ==# "." ? "" : v:val'), ',') - if &g:path !~# '\v^\.%(,/%(usr|emx)/include)=,,$' + if &g:path !~# '\v^%(\.,)=%(/%(usr|emx)/include,)=,$' let path = substitute(&g:path,',,$',',','') . ',' . path endif return path @@ -152,7 +152,7 @@ endif function! s:map(mode, flags, map) abort let from = matchstr(a:map, '\S\+') if empty(mapcheck(from, a:mode)) - exe a:mode.'map' '' a:map + exe a:mode.'map' '' a:flags a:map let b:undo_ftplugin .= '|sil! '.a:mode.'unmap '.from endif endfunction @@ -311,13 +311,16 @@ function! s:synid() abort endfunction function! s:wrap_i(back,forward) abort - execute 'norm k'.a:forward + execute 'norm! k' + execute 'norm '.a:forward let line = line('.') execute 'norm '.a:back if line('.') == line - 1 return s:wrap_a(a:back,a:forward) endif - execute 'norm jV'.a:forward.'k' + execute 'norm! jV' + execute 'norm '.a:forward + execute 'norm! k' endfunction function! s:wrap_a(back,forward) abort @@ -330,11 +333,15 @@ function! s:wrap_a(back,forward) abort - endwhile if exists('after') - execute 'norm V'.a:forward.'j' + execute 'norm! V' + execute 'norm '.a:forward + execute 'norm! j' elseif line('.') > 1 && getline(line('.')-1) =~# '^\s*$' - execute 'norm kV'.a:forward + execute 'norm! kV' + execute 'norm '.a:forward else - execute 'norm V'.a:forward + execute 'norm! V' + execute 'norm '.a:forward endif endfunction @@ -366,7 +373,6 @@ function! RubyCursorFile() abort endtry let pre = matchstr(strpart(getline('.'), 0, col('.')-1), '.*\f\@' && cfile !~# '\.rb$' ? '.rb' : '' if s:synid() ==# hlID('rubyConstant') let cfile = substitute(cfile,'\.\w\+[?!=]\=$','','') let cfile = substitute(cfile,'^::','','') @@ -375,12 +381,15 @@ function! RubyCursorFile() abort let cfile = substitute(cfile,'\(\l\|\d\)\(\u\)','\1_\2', 'g') return tolower(cfile) . '.rb' elseif getline('.') =~# '^\s*require_relative\s*\(["'']\).*\1\s*$' - let cfile = expand('%:p:h') . '/' . matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') . ext + let cfile = expand('%:p:h') . '/' . matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') + let cfile .= cfile !~# '\.rb$' ? '.rb' : '' elseif getline('.') =~# '^\s*\%(require[( ]\|load[( ]\|autoload[( ]:\w\+,\)\s*\%(::\)\=File\.expand_path(\(["'']\)\.\./.*\1,\s*__FILE__)\s*$' let target = matchstr(getline('.'),'\(["'']\)\.\.\zs/.\{-\}\ze\1') - let cfile = expand('%:p:h') . target . ext + let cfile = expand('%:p:h') . target + let cfile .= cfile !~# '\.rb$' ? '.rb' : '' elseif getline('.') =~# '^\s*\%(require \|load \|autoload :\w\+,\)\s*\(["'']\).*\1\s*$' - let cfile = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') . ext + let cfile = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') + let cfile .= cfile !~# '\.rb$' ? '.rb' : '' elseif pre.post =~# '\' && cfile =~# '^\.\.' let cfile = expand('%:p:h') . strpart(cfile, 2) else -- cgit From e8178093dc41204d9f88e81095b12c5867b0fe54 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 25 Apr 2021 14:43:59 -0400 Subject: vim-patch:1d9215b9aaa1 Update runtime files. https://github.com/vim/vim/commit/1d9215b9aaa120b9d78fee49488556f73007ce78 --- runtime/ftplugin/swift.vim | 15 +++++++++++++++ runtime/ftplugin/swiftgyb.vim | 11 +++++++++++ 2 files changed, 26 insertions(+) create mode 100644 runtime/ftplugin/swift.vim create mode 100644 runtime/ftplugin/swiftgyb.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/swift.vim b/runtime/ftplugin/swift.vim new file mode 100644 index 0000000000..26d04eb5fa --- /dev/null +++ b/runtime/ftplugin/swift.vim @@ -0,0 +1,15 @@ +" This source file is part of the Swift.org open source project +" +" Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors +" Licensed under Apache License v2.0 with Runtime Library Exception +" +" See https://swift.org/LICENSE.txt for license information +" See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +" +" Vim maintainer: Emir SARI + +setlocal comments=s1:/*,mb:*,ex:*/,:///,:// +setlocal expandtab +setlocal ts=2 +setlocal sw=2 +setlocal smartindent diff --git a/runtime/ftplugin/swiftgyb.vim b/runtime/ftplugin/swiftgyb.vim new file mode 100644 index 0000000000..8e8fc2b791 --- /dev/null +++ b/runtime/ftplugin/swiftgyb.vim @@ -0,0 +1,11 @@ +" This source file is part of the Swift.org open source project +" +" Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors +" Licensed under Apache License v2.0 with Runtime Library Exception +" +" See https://swift.org/LICENSE.txt for license information +" See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +" +" Vim maintainer: Emir SARI + +runtime! ftplugin/swift.vim -- cgit From 4819737853fc3676b976be93bd0332a3e44ab837 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 26 Apr 2021 21:25:27 -0400 Subject: vim-patch:560979ed4f02 Update runtime files. https://github.com/vim/vim/commit/560979ed4f0216f902a2c247e937f00a27dcb198 Omit vim9. --- runtime/ftplugin/c.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/c.vim b/runtime/ftplugin/c.vim index 6047f9f863..00937c2383 100644 --- a/runtime/ftplugin/c.vim +++ b/runtime/ftplugin/c.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: C " Maintainer: Bram Moolenaar -" Last Change: 2017 Sep 28 +" Last Change: 2020 Feb 01 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -15,12 +15,16 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo-=C -let b:undo_ftplugin = "setl fo< com< ofu<" +let b:undo_ftplugin = "setl fo< com< ofu< cms< def< inc<" " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting or using "o". setlocal fo-=t fo+=croql +" These options have the right value as default, but the user may have +" overruled that. +setlocal commentstring& define& include& + " Set completion with CTRL-X CTRL-O to autoloaded function. if exists('&ofu') setlocal ofu=ccomplete#Complete -- cgit From e7f6c520141c104960790d9bb2e52260ba959b76 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 27 Apr 2021 20:26:22 -0400 Subject: vim-patch:b17893aa940d Update runtime files https://github.com/vim/vim/commit/b17893aa940dc7d45421f875f5d90855880aad27 Omit feedkeys() changes. --- runtime/ftplugin/yaml.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/yaml.vim b/runtime/ftplugin/yaml.vim index ceff36f7e4..db7cbd7ddb 100644 --- a/runtime/ftplugin/yaml.vim +++ b/runtime/ftplugin/yaml.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: YAML (YAML Ain't Markup Language) -" Previous Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Previous Maintainer: Nikolai Weibull (inactive) +" Last Change: 2020 Mar 02 if exists("b:did_ftplugin") finish @@ -16,5 +16,10 @@ let b:undo_ftplugin = "setl com< cms< et< fo<" setlocal comments=:# commentstring=#\ %s expandtab setlocal formatoptions-=t formatoptions+=croql +if !exists("g:yaml_recommended_style") || g:yaml_recommended_style != 0 + let b:undo_ftplugin ..= " sw< sts<" + setlocal shiftwidth=2 softtabstop=2 +endif + let &cpo = s:cpo_save unlet s:cpo_save -- cgit From c287e734f10e074c70276fa74e8a938466018f4b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 27 Apr 2021 21:26:36 -0400 Subject: vim-patch:ff78155aa175 Update runtime files https://github.com/vim/vim/commit/ff78155aa1755aced96a3b343e81939c94aac721 Omit menu_info(). --- runtime/ftplugin/swift.vim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/swift.vim b/runtime/ftplugin/swift.vim index 26d04eb5fa..55678f8bfc 100644 --- a/runtime/ftplugin/swift.vim +++ b/runtime/ftplugin/swift.vim @@ -10,6 +10,5 @@ setlocal comments=s1:/*,mb:*,ex:*/,:///,:// setlocal expandtab -setlocal ts=2 -setlocal sw=2 +setlocal sw=4 sts=4 setlocal smartindent -- cgit From e612a0a76a5c990220113e76ec6a07fe49c28618 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 27 Apr 2021 21:48:38 -0400 Subject: vim-patch:d1caa941d876 Update runtime files https://github.com/vim/vim/commit/d1caa941d876181aae0ebebc6ea954045bf0da24 Cherry-pick error E452 from patch v8.2.0486. --- runtime/ftplugin/rst.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/rst.vim b/runtime/ftplugin/rst.vim index f0646e9f36..ff7a402d10 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-12-29 +" Latest Revision: 2020-03-31 if exists("b:did_ftplugin") finish @@ -34,7 +34,7 @@ if exists("g:rst_style") && g:rst_style != 0 setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8 endif -if has('patch-7.3.867') " Introduced the TextChanged event. +if g:rst_fold_enabled != 0 && has('patch-7.3.867') " Introduced the TextChanged event. setlocal foldmethod=expr setlocal foldexpr=RstFold#GetRstFold() setlocal foldtext=RstFold#GetRstFoldText() -- cgit From c2635665c5a378dc8ed14b0199202fa86b226ad9 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 27 Apr 2021 23:14:29 -0400 Subject: vim-patch:2c7f8c574f1f Update runtime files https://github.com/vim/vim/commit/2c7f8c574f1f8723d59adca3fec8fb89c41cf8c9 Omit the following line for man.vim: hi def link manFooter PreProc --- runtime/ftplugin/fortran.vim | 7 ++++--- runtime/ftplugin/perl.vim | 6 +++--- runtime/ftplugin/perl6.vim | 6 +++--- runtime/ftplugin/systemd.vim | 36 +++++++++++++++++++++++++++++++++++- 4 files changed, 45 insertions(+), 10 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/fortran.vim b/runtime/ftplugin/fortran.vim index 5d42409fd4..385f1557de 100644 --- a/runtime/ftplugin/fortran.vim +++ b/runtime/ftplugin/fortran.vim @@ -1,7 +1,8 @@ " Vim settings file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66) " Version: 0.50 -" Last Change: 2015 Nov. 30 +" Last Change: 2020 Apr 20 +" Patched By: Eisuke Kawashima " Maintainer: Ajit J. Thakkar ; " Usage: For instructions, do :help fortran-plugin from Vim " Credits: @@ -31,10 +32,10 @@ if !exists("b:fortran_fixed_source") elseif exists("fortran_fixed_source") " User guarantees fixed source form let b:fortran_fixed_source = 1 - elseif expand("%:e") ==? "f\<90\|95\|03\|08\>" + elseif expand("%:e") =~? '^f\%(90\|95\|03\|08\)$' " Free-form file extension defaults as in Intel ifort, gcc(gfortran), NAG, Pathscale, and Cray compilers let b:fortran_fixed_source = 0 - elseif expand("%:e") ==? "f\|f77\|for" + elseif expand("%:e") =~? '^\%(f\|f77\|for\)$' " Fixed-form file extension defaults let b:fortran_fixed_source = 1 else diff --git a/runtime/ftplugin/perl.vim b/runtime/ftplugin/perl.vim index e7acf654f3..603ba49502 100644 --- a/runtime/ftplugin/perl.vim +++ b/runtime/ftplugin/perl.vim @@ -1,9 +1,9 @@ " Vim filetype plugin file " Language: Perl " Maintainer: vim-perl -" Homepage: http://github.com/vim-perl/vim-perl -" Bugs/requests: http://github.com/vim-perl/vim-perl/issues -" Last Change: 2015-02-09 +" Homepage: https://github.com/vim-perl/vim-perl +" Bugs/requests: https://github.com/vim-perl/vim-perl/issues +" Last Change: 2020 Apr 15 if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 diff --git a/runtime/ftplugin/perl6.vim b/runtime/ftplugin/perl6.vim index 5318df63bc..0467bea0c2 100644 --- a/runtime/ftplugin/perl6.vim +++ b/runtime/ftplugin/perl6.vim @@ -1,9 +1,9 @@ " Vim filetype plugin file " Language: Perl 6 " Maintainer: vim-perl -" Homepage: http://github.com/vim-perl/vim-perl -" Bugs/requests: http://github.com/vim-perl/vim-perl/issues -" Last Change: 2013-07-21 +" Homepage: https://github.com/vim-perl/vim-perl +" Bugs/requests: https://github.com/vim-perl/vim-perl/issues +" Last Change: 2020 Apr 15 " Contributors: Hinrik Örn Sigurðsson " " Based on ftplugin/perl.vim by Dan Sharp diff --git a/runtime/ftplugin/systemd.vim b/runtime/ftplugin/systemd.vim index 60b3fd996d..4c5c9a1dc1 100644 --- a/runtime/ftplugin/systemd.vim +++ b/runtime/ftplugin/systemd.vim @@ -1,7 +1,41 @@ " Vim filetype plugin file -" Language: systemd.unit(5) +" Language: systemd.unit(5) +" Keyword Lookup Support: Enno Nagel if !exists('b:did_ftplugin') " Looks a lot like dosini files. runtime! ftplugin/dosini.vim endif + +if !has('unix') + finish +endif + +if !has('gui_running') + command! -buffer -nargs=1 Sman silent exe '!' . KeywordLookup_systemd() | redraw! +elseif has('terminal') + command! -buffer -nargs=1 Sman silent exe 'term ' . KeywordLookup_systemd() +else + finish +endif + +if !exists('*KeywordLookup_systemd') + function KeywordLookup_systemd(keyword) abort + let matches = matchlist(getline(search('\v^\s*\[\s*.+\s*\]\s*$', 'nbWz')), '\v^\s*\[\s*(\k+).*\]\s*$') + if len(matches) > 1 + let section = matches[1] + return 'LESS= MANPAGER="less --pattern=''(^|,)\s+' . a:keyword . '=$'' --hilite-search" man ' . 'systemd.' . section + else + return 'LESS= MANPAGER="less --pattern=''(^|,)\s+' . a:keyword . '=$'' --hilite-search" man ' . 'systemd' + endif + endfunction +endif + +setlocal iskeyword+=- +setlocal keywordprg=:Sman + +if !exists('b:undo_ftplugin') || empty(b:undo_ftplugin) + let b:undo_ftplugin = 'setlocal keywordprg< iskeyword<' +else + let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword<' +endif -- cgit From 3d86857f28f0c9b93c5f56c8ce846ddd26ddbf38 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 28 Apr 2021 01:30:18 -0400 Subject: vim-patch:2cfb4a2a7248 Update runtime files https://github.com/vim/vim/commit/2cfb4a2a7248eeb40112bb482ab5b15f01b20433 --- runtime/ftplugin/dosbatch.vim | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/dosbatch.vim b/runtime/ftplugin/dosbatch.vim index 070bdc4ba2..0c5cde2503 100644 --- a/runtime/ftplugin/dosbatch.vim +++ b/runtime/ftplugin/dosbatch.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: MS-DOS .bat files " Maintainer: Mike Williams -" Last Change: 14th April 2019 +" Last Change: 7th May 2020 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -19,12 +19,21 @@ setlocal comments=b:rem,b:@rem,b:REM,b:@REM,::: setlocal commentstring=::\ %s setlocal formatoptions-=t formatoptions+=rol +" Lookup DOS keywords using Windows command help. +if executable('help.exe') + if has('terminal') + setlocal keywordprg=:term\ help.exe + else + setlocal keywordprg=help.exe + endif +endif + " Define patterns for the browse file filter if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "DOS Batch Files (*.bat, *.cmd)\t*.bat;*.cmd\nAll Files (*.*)\t*.*\n" endif -let b:undo_ftplugin = "setlocal comments< formatoptions<" +let b:undo_ftplugin = "setlocal comments< formatoptions< keywordprg<" \ . "| unlet! b:browsefiler" let &cpo = s:cpo_save -- cgit From 0185625c04ee736dac36789d0cb590ecde8926e8 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 28 Apr 2021 01:33:17 -0400 Subject: vim-patch:47e13953ffdb Update runtime files https://github.com/vim/vim/commit/47e13953ffdbb9f163b901196dec8c2100b72edd Ignore *.rej files, generated by vim-patch.sh. Source of mistakes for 1st-time contributors. --- runtime/ftplugin/masm.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 runtime/ftplugin/masm.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/masm.vim b/runtime/ftplugin/masm.vim new file mode 100644 index 0000000000..235469ac32 --- /dev/null +++ b/runtime/ftplugin/masm.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin file +" Language: Microsoft Macro Assembler (80x86) +" Maintainer: Wu Yongwei +" Last Change: 2020-05-09 23:02:05 +0800 + +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 iskeyword<" + +setlocal iskeyword=@,48-57,_,36,60,62,63,@-@ + +let &cpo = s:cpo_save +unlet s:cpo_save -- cgit From 65821cc1b94e3beb2de19e1bb8def3fe6e82bc1f Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 28 Apr 2021 01:55:06 -0400 Subject: vim-patch:388a5d4f20b4 Update runtime files https://github.com/vim/vim/commit/388a5d4f20b4b64341d1604aa238cab85827b892 Omit vim9. --- runtime/ftplugin/vim.vim | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 34f5eb6db1..c0d0fc00cd 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -12,7 +12,7 @@ endif let b:did_ftplugin = 1 let s:cpo_save = &cpo -set cpo-=C +set cpo&vim if !exists('*VimFtpluginUndo') func VimFtpluginUndo() @@ -66,14 +66,14 @@ 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") - 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") + nnoremap [[ m':call search('^\s*\(fu\%[nction]\\|def\)\>', "bW") + vnoremap [[ m':exe "normal! gv"call search('^\s*\(fu\%[nction]\\|def\)\>', "bW") + nnoremap ]] m':call search('^\s*\(fu\%[nction]\\|def\)\>', "W") + vnoremap ]] m':exe "normal! gv"call search('^\s*\(fu\%[nction]\\|def\)\>', "W") + nnoremap [] m':call search('^\s*end\(f\%[unction]\\|def\)\>', "bW") + vnoremap [] m':exe "normal! gv"call search('^\s*end\(f\%[unction]\\|def\)\>', "bW") + nnoremap ][ m':call search('^\s*end\(f\%[unction]\\|def\)\>', "W") + vnoremap ][ m':exe "normal! gv"call search('^\s*end\(f\%[unction]\\|def\)\>', "W") " Move around comments nnoremap ]" :call search('^\(\s*".*\n\)\@ -- cgit From 565783be4b42ec8cf2d24543b7d501499c6a1091 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 28 Apr 2021 08:39:30 -0400 Subject: vim-patch:acc224064033 Update runtime files https://github.com/vim/vim/commit/acc224064033e5cea21ef7f1eefb356ca06ff11d Omit 'quickfixtextfunc'. Omit ftplugin/man.vim. --- runtime/ftplugin/asm.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 runtime/ftplugin/asm.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/asm.vim b/runtime/ftplugin/asm.vim new file mode 100644 index 0000000000..0914bf634a --- /dev/null +++ b/runtime/ftplugin/asm.vim @@ -0,0 +1,11 @@ +" Vim filetype plugin file +" Language: asm +" Maintainer: Colin Caine +" Last Changed: 23 May 2020 + +if exists("b:did_ftplugin") | finish | endif + +setl comments=:;,s1:/*,mb:*,ex:*/,:// +setl commentstring=;%s + +let b:did_ftplugin = 1 -- cgit From 7c6ca6fed8bceed67315e046a33701d71ac4b436 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 28 Apr 2021 21:58:50 -0400 Subject: vim-patch:73fef33014db Update runtime files https://github.com/vim/vim/commit/73fef33014dbf21fc59e7e47fb091117868d82fb Omit usr_46.txt. --- runtime/ftplugin/vim.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index c0d0fc00cd..465b2f95c5 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: 2018 Aug 07 +" Last Change: 2020 Jun 16 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -86,9 +86,10 @@ endif if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = - \ '\:\:\,' . - \ '\<\(wh\%[ile]\|for\)\>:\:\:\,' . + \ '\<\%(fu\%[nction]\|def\)\>:\:\<\%(endf\%[unction]\|enddef\)\>,' . + \ '\<\(wh\%[ile]\|for\)\>:\:\:\,' . \ '\:\:\,' . + \ '{:},' . \ '\:\:\:\,' . \ '\\)\@!\S:\,' " Ignore syntax region commands and settings, any 'en*' would clobber -- cgit From 27fb03f5a03db6738967f9e0e0ea85ea0fab7592 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 28 Apr 2021 22:51:23 -0400 Subject: vim-patch:7ff78465f705 Update runtime files https://github.com/vim/vim/commit/7ff78465f7057a672a6de0d75d56286da253501b --- runtime/ftplugin/vim.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 465b2f95c5..1009292788 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: 2020 Jun 16 +" Last Change: 2020 Jul 06 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -49,14 +49,14 @@ setlocal isk+=# setlocal keywordprg=:help " Set 'comments' to format dashed lists in comments -setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\" +setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",:# " Format comments to be up to 78 characters long if &tw == 0 setlocal tw=78 endif -" Comments start with a double quote +" Comments start with a double quote; in Vim9 script # would also work setlocal commentstring=\"%s " Prefer Vim help instead of manpages. -- cgit From 0a0034718c00fd9f434d20d29e415287db284bbe Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 29 Apr 2021 08:54:38 -0400 Subject: vim-patch:2547aa930b59 Update runtime files. https://github.com/vim/vim/commit/2547aa930b59f5e2bcb70e81d5a57ed461e59b4f Omit modifyOtherKeys, vim9, vim.man. --- runtime/ftplugin/cpp.vim | 9 +++++++-- runtime/ftplugin/diff.vim | 5 ++++- runtime/ftplugin/vim.vim | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/cpp.vim b/runtime/ftplugin/cpp.vim index 8c3f211da8..f9d31cbec3 100644 --- a/runtime/ftplugin/cpp.vim +++ b/runtime/ftplugin/cpp.vim @@ -1,12 +1,17 @@ " Vim filetype plugin file " Language: C++ " Maintainer: Bram Moolenaar -" Last Change: 2001 Jan 15 +" Last Change: 2020 Jul 26 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif -" Behaves just like C +" Behaves mostly just like C runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim + +" C++ uses templates with +" Disabled, because it gives an error for typing an unmatched ">". +" set matchpairs+=<:> +" let b:undo_ftplugin ..= ' | setl matchpairs<' diff --git a/runtime/ftplugin/diff.vim b/runtime/ftplugin/diff.vim index 3fe1b84a04..0464290475 100644 --- a/runtime/ftplugin/diff.vim +++ b/runtime/ftplugin/diff.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Diff " Maintainer: Bram Moolenaar -" Last Change: 2005 Jul 27 +" Last Change: 2020 Jul 18 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -13,3 +13,6 @@ let b:undo_ftplugin = "setl modeline<" " Don't use modelines in a diff, they apply to the diffed file setlocal nomodeline + +" If there are comments they start with # +let &commentstring = "# %s" diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 1009292788..ee189e39c0 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: 2020 Jul 06 +" Last Change: 2020 Jul 26 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -86,7 +86,7 @@ endif if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = - \ '\<\%(fu\%[nction]\|def\)\>:\:\<\%(endf\%[unction]\|enddef\)\>,' . + \ '\<\%(fu\%[nction]\|def\)\>[^(]:\:\<\%(endf\%[unction]\|enddef\)\>,' . \ '\<\(wh\%[ile]\|for\)\>:\:\:\,' . \ '\:\:\,' . \ '{:},' . -- cgit From 09f3e62bc623dd3cbcbc708b019b55a8b9449de7 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 29 Apr 2021 18:34:49 -0400 Subject: vim-patch:e7b1ea0276cc Update runtime files. https://github.com/vim/vim/commit/e7b1ea0276cc83cd5c612f3189a174a60d57b5ed --- runtime/ftplugin/vim.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index ee189e39c0..9369f7c63c 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -86,7 +86,7 @@ endif if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = - \ '\<\%(fu\%[nction]\|def\)\>[^(]:\:\<\%(endf\%[unction]\|enddef\)\>,' . + \ '\<\%(fu\%[nction]\|def\)\>)\@!:\:\<\%(endf\%[unction]\|enddef\)\>,' . \ '\<\(wh\%[ile]\|for\)\>:\:\:\,' . \ '\:\:\,' . \ '{:},' . -- cgit From 9f54d125d2b601029cb2b6dbffcc361c2e8fb974 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 29 Apr 2021 20:43:22 -0400 Subject: vim-patch:3d1cde8a2f28 Update runtime files. https://github.com/vim/vim/commit/3d1cde8a2f28dce2c82d2b2b4c5e35e6662030e0 --- runtime/ftplugin/cobol.vim | 5 +++-- runtime/ftplugin/css.vim | 7 ++++--- runtime/ftplugin/vim.vim | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/cobol.vim b/runtime/ftplugin/cobol.vim index d96a1bf281..ec1e95456d 100644 --- a/runtime/ftplugin/cobol.vim +++ b/runtime/ftplugin/cobol.vim @@ -2,7 +2,7 @@ " Language: cobol " Maintainer: Ankit Jain " (formerly Tim Pope ) -" Last Update: By Ankit Jain (changed maintainer) on 22.03.2019 +" Last Update: By Ankit Jain (add gtk support) on 15.08.2020 " Insert mode mappings: " Normal mode mappings: < > << >> [[ ]] [] ][ @@ -37,7 +37,8 @@ if exists("loaded_matchit") \ '-\@\%(.*\(\%$\|\%(\n\%(\%(\s*\|.\{6\}\)[*/].*\n\)*\)\=\s*\%(invalid\s\+key\|at\s\+end\|no\s\+data\|at\s\+end-of-page\)\>\)\)\@=:\%(\:\' .s:ordot endif -if has("gui_win32") && !exists("b:browsefilter") +" add gtk support +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "COBOL Source Files (*.cbl, *.cob)\t*.cbl;*.cob;*.lib\n". \ "All Files (*.*)\t*.*\n" endif diff --git a/runtime/ftplugin/css.vim b/runtime/ftplugin/css.vim index ea4424418c..33fcee31c0 100644 --- a/runtime/ftplugin/css.vim +++ b/runtime/ftplugin/css.vim @@ -1,7 +1,8 @@ " Vim filetype plugin file -" Language: CSS -" Previous Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Language: CSS +" Maintainer: Doug Kearns +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2008-07-09 if exists("b:did_ftplugin") finish diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 9369f7c63c..4df0d4b59b 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: 2020 Jul 26 +" Last Change: 2020 Aug 14 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -49,7 +49,8 @@ setlocal isk+=# setlocal keywordprg=:help " Set 'comments' to format dashed lists in comments -setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",:# +" Avoid that #{} starts a comment. +setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",b:# " Format comments to be up to 78 characters long if &tw == 0 -- cgit From f5d1f0bf0372ac57c8b1f814bb5b18f13b3b53de Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 29 Apr 2021 21:57:46 -0400 Subject: vim-patch:1c6737b20a5c Update runtime files. https://github.com/vim/vim/commit/1c6737b20a5cf71751b180461cea22fc76d8870c --- runtime/ftplugin/spec.vim | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/spec.vim b/runtime/ftplugin/spec.vim index 2a961f8244..2b33bc81aa 100644 --- a/runtime/ftplugin/spec.vim +++ b/runtime/ftplugin/spec.vim @@ -183,12 +183,10 @@ if !exists("*s:ParseRpmVars") endif let varname = strpart(a:str, start+2, end-(start+2)) execute a:strline - let definestr = "^[ \t]*%(?:global|define)[ \t]\\+" . varname . "[ \t]\\+\\(.*\\)$" + let definestr = "^[ \t]*%\\(define\\|global\\)[ \t]\\+".varname."[ \t]\\+\\(.*\\)$" let linenum = search(definestr, "bW") - if (linenum != -1) - let ret = ret . substitute(getline(linenum), definestr, "\\1", "") - else - let ret = ret . strpart(str, start, end+1-start) + if (linenum != 0) + let ret = ret . substitute(getline(linenum), definestr, "\\2", "") endif endwhile return ret -- cgit From e1171cf1d2e4cfb02b5ea1328310612a2e6548ec Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 01:39:00 -0400 Subject: vim-patch:d58a3bf7dac8 Update runtime files. https://github.com/vim/vim/commit/d58a3bf7dac8d53faf42e13cc1152b110f12c404 Omit syntax/man.vim. --- runtime/ftplugin/awk.vim | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/awk.vim b/runtime/ftplugin/awk.vim index dcefc85ec3..9809fec383 100644 --- a/runtime/ftplugin/awk.vim +++ b/runtime/ftplugin/awk.vim @@ -1,9 +1,10 @@ " Vim filetype plugin " Language: awk, nawk, gawk, mawk " Maintainer: Antonio Colombo -" Last Change: 2017 Feb 17 +" Last Change: 2020 Sep 28 " This plugin was prepared by Mark Sikora +" This plugin was updated as proposed by Doug Kearns " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -13,6 +14,42 @@ endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 -let b:undo_ftplugin = "setl commentstring<" +let s:cpo_save = &cpo +set cpo&vim +setlocal comments=:# setlocal commentstring=#\ %s +setlocal formatoptions-=t formatoptions+=croql + +setlocal define=function +setlocal suffixesadd+=.awk + +let b:undo_ftplugin = "setl fo< com< cms< def< sua<" . + \ " | unlet! b:browsefilter" + +" TODO: set this in scripts.vim? +if exists("g:awk_is_gawk") + setlocal include=@include + setlocal suffixesadd+=.gawk + if has("unix") || has("win32unix") + setlocal formatprg=gawk\ -f-\ -o/dev/stdout + let b:undo_ftplugin .= " | setl fp<" + endif + + let path = system("gawk 'BEGIN { printf ENVIRON[\"AWKPATH\"] }'") + let path = substitute(path, '^\.\=:\|:\.\=$\|:\.\=:', ',,', 'g') " POSIX cwd + let path = substitute(path, ':', ',', 'g') + + let &l:path = path + let b:undo_ftplugin .= " | setl inc< path<" +endif + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Awk Source Files (*.awk,*.gawk)\t*.awk;*.gawk\n" . + \ "All Files (*.*)\t*.*\n" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 -- cgit From b16c7c515c34d2f695a595527594325abc6a640b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 14:08:45 -0400 Subject: vim-patch:4f4d51a942cc Update runtime files. https://github.com/vim/vim/commit/4f4d51a942cc2c6b3e936ee0f93f00c2d000065c Omit "??" operator. Patches v8.2.1794,v8.2.1798 are not ported yet. --- runtime/ftplugin/falcon.vim | 3 ++- runtime/ftplugin/fortran.vim | 12 ++++++------ runtime/ftplugin/python.vim | 42 +++++++++++++----------------------------- 3 files changed, 21 insertions(+), 36 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/falcon.vim b/runtime/ftplugin/falcon.vim index 4fc135b4a1..affca38481 100644 --- a/runtime/ftplugin/falcon.vim +++ b/runtime/ftplugin/falcon.vim @@ -3,6 +3,7 @@ " Author: Steven Oliver " Copyright: Copyright (c) 2009-2013 Steven Oliver " License: You may redistribute this under the same terms as Vim itself +" Last Update: 2020 Oct 10 " -------------------------------------------------------------------------- " Only do this when not done yet for this buffer @@ -14,7 +15,7 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim -setlocal softtabstop=4 shiftwidth=4 fileencoding=utf-8 +setlocal softtabstop=4 shiftwidth=4 setlocal suffixesadd=.fal,.ftd " Matchit support diff --git a/runtime/ftplugin/fortran.vim b/runtime/ftplugin/fortran.vim index 385f1557de..b9ba3c4722 100644 --- a/runtime/ftplugin/fortran.vim +++ b/runtime/ftplugin/fortran.vim @@ -1,13 +1,13 @@ " Vim settings file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66) -" Version: 0.50 -" Last Change: 2020 Apr 20 -" Patched By: Eisuke Kawashima +" Version: (v52) 2020 October 07 " Maintainer: Ajit J. Thakkar ; " Usage: For instructions, do :help fortran-plugin from Vim " Credits: -" Useful suggestions were made by Stefano Zacchiroli, Hendrik Merx, Ben -" Fritz, and David Barnett. +" Version 0.1 was created in September 2000 by Ajit Thakkar. +" Since then, useful suggestions and contributions have been made, in order, by: +" Stefano Zacchiroli, Hendrik Merx, Ben Fritz, David Barnett, Eisuke Kawashima, +" and Doug Kearns. " Only do these settings when not done yet for this buffer if exists("b:did_ftplugin") @@ -119,7 +119,7 @@ if !exists("b:match_words") endif " File filters for :browse e -if has("gui_win32") && !exists("b:browsefilter") +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "Fortran Files (*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n" . \ "All Files (*.*)\t*.*\n" endif diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim index 64c1a87a69..000ddf52a3 100644 --- a/runtime/ftplugin/python.vim +++ b/runtime/ftplugin/python.vim @@ -3,7 +3,7 @@ " Maintainer: Tom Picton " Previous Maintainer: James Sully " Previous Maintainer: Johannes Zellner -" Last Change: Sun 17 Mar 2019 +" Last Change: Mon, 5 October 2020 " https://github.com/tpict/vim-ftplugin-python if exists("b:did_ftplugin") | finish | endif @@ -14,6 +14,7 @@ set cpo&vim setlocal cinkeys-=0# setlocal indentkeys-=0# setlocal include=^\\s*\\(from\\\|import\\) +setlocal define=^\\s*\\(def\\\|class\\) " For imports with leading .., append / and replace additional .s with ../ let b:grandparent_match = '^\(.\.\)\(\.*\)' @@ -38,7 +39,7 @@ setlocal comments=b:#,fb:- setlocal commentstring=#\ %s if has('python3') - setlocal omnifunc=python3complete#Complete + setlocal omnifunc=python3complete#Complete elseif has('python') setlocal omnifunc=pythoncomplete#Complete endif @@ -115,35 +116,18 @@ endif if !exists("g:python_recommended_style") || g:python_recommended_style != 0 " As suggested by PEP8. - setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8 + setlocal expandtab tabstop=4 softtabstop=4 shiftwidth=4 endif -" First time: try finding "pydoc". -if !exists('g:pydoc_executable') - if executable('pydoc') - let g:pydoc_executable = 1 - else - let g:pydoc_executable = 0 - endif -endif - -" Windows-specific pydoc setup -if has('win32') || has('win64') - if executable('python') - " available as Tools\scripts\pydoc.py - let g:pydoc_executable = 1 - else - let g:pydoc_executable = 0 - endif -endif - -" If "pydoc" was found use it for keywordprg. -if g:pydoc_executable - if has('win32') || has('win64') - setlocal keywordprg=python\ -m\ pydoc\ - else - setlocal keywordprg=pydoc - endif +" Use pydoc for keywordprg. +" Unix users preferentially get pydoc3, then pydoc2. +" Windows doesn't have a standalone pydoc executable in $PATH by default, nor +" does it have separate python2/3 executables, so Windows users just get +" whichever version corresponds to their installed Python version. +if executable('python3') + setlocal keywordprg=python3\ -m\ pydoc +elseif executable('python') + setlocal keywordprg=python\ -m\ pydoc endif " Script for filetype switching to undo the local stuff we may have changed -- cgit From 330500a5bfb1207e0c9eb79ac27fb8244da93ce0 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 14:23:09 -0400 Subject: vim-patch:cb80aa2d53e5 Update runtime files. https://github.com/vim/vim/commit/cb80aa2d53e56d3aba3b3c439fb467f29a750c5e Omit runtime/doc/tabpage.txt. Patch v8.2.1401 is not ported yet. Port optwin.vim changes without gettext(). Patch v8.2.1544 is not ported yet. --- runtime/ftplugin/erlang.vim | 4 ++-- runtime/ftplugin/make.vim | 6 +++--- runtime/ftplugin/rpl.vim | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/erlang.vim b/runtime/ftplugin/erlang.vim index 2bbc345b43..ece11d7249 100644 --- a/runtime/ftplugin/erlang.vim +++ b/runtime/ftplugin/erlang.vim @@ -1,7 +1,7 @@ " Vim ftplugin file " Language: Erlang -" Author: Oscar Hellstrm -" Contributors: Ricardo Catalinas Jimnez +" Author: Oscar Hellström +" Contributors: Ricardo Catalinas Jiménez " Eduardo Lopez (http://github.com/tapichu) " License: Vim license " Version: 2012/01/25 diff --git a/runtime/ftplugin/make.vim b/runtime/ftplugin/make.vim index bfa8703082..168bc38eb3 100644 --- a/runtime/ftplugin/make.vim +++ b/runtime/ftplugin/make.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Make " Maintainer: Bram Moolenaar -" Last Change: 2019 Apr 02 +" Last Change: 2020 Oct 16 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -9,10 +9,10 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin = 1 -let b:undo_ftplugin = "setl et< sts< fo< com< cms< inc<" +let b:undo_ftplugin = "setl et< sts< sw< fo< com< cms< inc<" " Make sure a hard tab is used, required for most make programs -setlocal noexpandtab softtabstop=0 +setlocal noexpandtab softtabstop=0 shiftwidth=0 " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting or using "o". diff --git a/runtime/ftplugin/rpl.vim b/runtime/ftplugin/rpl.vim index 909e141cc6..8b4d5b0d48 100644 --- a/runtime/ftplugin/rpl.vim +++ b/runtime/ftplugin/rpl.vim @@ -1,6 +1,6 @@ " Vim filetype plugin file " Language: RPL/2 -" Maintainer: Jol BERTRAND +" Maintainer: Joël BERTRAND " Last Change: 2012 Mar 07 " Version: 0.1 -- cgit From 2ebd1f6286211bc67cc83e3ad912d28b372ea4b6 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 17:50:17 -0400 Subject: vim-patch:3132cddd209e Update runtime files https://github.com/vim/vim/commit/3132cddd209ee510bde48b6520290cb26c8f604a Omit :sort,sort() changes. --- runtime/ftplugin/awk.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/awk.vim b/runtime/ftplugin/awk.vim index 9809fec383..1bca3ad3cf 100644 --- a/runtime/ftplugin/awk.vim +++ b/runtime/ftplugin/awk.vim @@ -1,7 +1,8 @@ " Vim filetype plugin -" Language: awk, nawk, gawk, mawk -" Maintainer: Antonio Colombo -" Last Change: 2020 Sep 28 +" Language: awk, nawk, gawk, mawk +" Maintainer: Doug Kearns +" Previous Maintainer: Antonio Colombo +" Last Change: 2020 Sep 28 " This plugin was prepared by Mark Sikora " This plugin was updated as proposed by Doug Kearns -- cgit From 0c93005383daacaa32d2c615716dc3a8c06d573f Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 19:03:43 -0400 Subject: vim-patch:4466ad6baa22 Update runtime files https://github.com/vim/vim/commit/4466ad6baa22485abb1147aca3340cced4778a66 Omit vim9 references in autocmd.txt. Omit matchfuzzypos(). --- runtime/ftplugin/pbtxt.vim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 runtime/ftplugin/pbtxt.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/pbtxt.vim b/runtime/ftplugin/pbtxt.vim new file mode 100644 index 0000000000..e3c1bf7650 --- /dev/null +++ b/runtime/ftplugin/pbtxt.vim @@ -0,0 +1,21 @@ +" Vim filetype plugin file +" Language: Protobuf Text Format +" Maintainer: Lakshay Garg +" Last Change: 2020 Nov 17 +" Homepage: https://github.com/lakshayg/vim-pbtxt + +if exists("b:did_ftplugin") + finish +endif + +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal commentstring=#\ %s + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 noet -- cgit From 83b6a18598a76730d546beebb1951054611344e5 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 19:15:16 -0400 Subject: vim-patch:23515b4ef758 Update runtime files https://github.com/vim/vim/commit/23515b4ef7580af8b9d3b964a558ab2007cacda5 Omit filetype.txt changes for :Man. --- runtime/ftplugin/nroff.vim | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/nroff.vim b/runtime/ftplugin/nroff.vim index 069c02e59a..cf62d02daa 100644 --- a/runtime/ftplugin/nroff.vim +++ b/runtime/ftplugin/nroff.vim @@ -1,7 +1,9 @@ " Vim filetype plugin " Language: roff(7) -" Maintainer: Chris Spiegel -" Last Change: 2019 Apr 24 +" Maintainer: Aman Verma +" Homepage: https://github.com/a-vrma/vim-nroff-ftplugin +" Previous Maintainer: Chris Spiegel +" Last Change: 2020 Nov 21 if exists("b:did_ftplugin") finish @@ -9,3 +11,7 @@ endif let b:did_ftplugin = 1 setlocal commentstring=.\\\"%s +setlocal comments=:.\\\" +setlocal sections+=Sh + +let b:undo_ftplugin = 'setlocal commentstring< comments< sections<' -- cgit From b1cd67b62e58c7f7d4139416e6813f8f50bc0fd6 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 21:09:53 -0400 Subject: vim-patch:4072ba571bab Update runtime files. https://github.com/vim/vim/commit/4072ba571babd733d1800c082416fe8fe3c28ed7 Omit vim9 references. Omit assert_fails(). Patch v8.2.1183 is not ported yet. --- runtime/ftplugin/css.vim | 5 +++-- runtime/ftplugin/spec.vim | 36 ++++++++++++++++++------------------ 2 files changed, 21 insertions(+), 20 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/css.vim b/runtime/ftplugin/css.vim index 33fcee31c0..ece2def4ee 100644 --- a/runtime/ftplugin/css.vim +++ b/runtime/ftplugin/css.vim @@ -2,7 +2,7 @@ " Language: CSS " Maintainer: Doug Kearns " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Last Change: 2020 Dec 21 if exists("b:did_ftplugin") finish @@ -12,11 +12,12 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim -let b:undo_ftplugin = "setl com< cms< inc< fo< ofu<" +let b:undo_ftplugin = "setl com< cms< inc< fo< ofu< isk<" setlocal comments=s1:/*,mb:*,ex:*/ commentstring& setlocal formatoptions-=t formatoptions+=croql setlocal omnifunc=csscomplete#CompleteCSS +setlocal iskeyword+=- let &l:include = '^\s*@import\s\+\%(url(\)\=' diff --git a/runtime/ftplugin/spec.vim b/runtime/ftplugin/spec.vim index 2b33bc81aa..ce00021a69 100644 --- a/runtime/ftplugin/spec.vim +++ b/runtime/ftplugin/spec.vim @@ -73,23 +73,23 @@ if !exists("*s:SpecChangelog") let chgline = -1 while (line <= line("$")) let linestr = getline(line) - if (name == "" && linestr =~? '^Name:') + if name == "" && linestr =~? '^Name:' let nameline = line let name = substitute(strpart(linestr,5), '^[ ]*\([^ ]\+\)[ ]*$','\1','') - elseif (ver == "" && linestr =~? '^Version:') + elseif ver == "" && linestr =~? '^Version:' let verline = line let ver = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','') - elseif (rel == "" && linestr =~? '^Release:') + elseif rel == "" && linestr =~? '^Release:' let relline = line let rel = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','') - elseif (linestr =~? '^%changelog') + elseif linestr =~? '^%changelog' let chgline = line execute line break endif let line = line+1 endwhile - if (nameline != -1 && verline != -1 && relline != -1) + if nameline != -1 && verline != -1 && relline != -1 let include_release_info = exists("g:spec_chglog_release_info") let name = s:ParseRpmVars(name, nameline) let ver = s:ParseRpmVars(ver, verline) @@ -100,20 +100,20 @@ if !exists("*s:SpecChangelog") call s:GetRelVer() - if (chgline == -1) + if chgline == -1 let option = confirm("Can't find %changelog. Create one? ","&End of file\n&Here\n&Cancel",3) - if (option == 1) + if option == 1 call append(line("$"),"") call append(line("$"),"%changelog") execute line("$") let chgline = line(".") - elseif (option == 2) + elseif option == 2 call append(line("."),"%changelog") normal j - chgline = line(".") + let chgline = line(".") endif endif - if (chgline != -1) + if chgline != -1 let tmptime = v:lc_time language time C let parsed_format = "* ".strftime(format)." - ".ver."-".rel @@ -122,16 +122,16 @@ if !exists("*s:SpecChangelog") let wrong_format = 0 let wrong_release = 0 let insert_line = 0 - if (getline(chgline+1) != parsed_format) + if getline(chgline+1) != parsed_format let wrong_format = 1 endif - if (include_release_info && getline(chgline+2) != release_info) + if include_release_info && getline(chgline+2) != release_info let wrong_release = 1 endif - if (wrong_format || wrong_release) - if (include_release_info && !wrong_release && !exists("g:spec_chglog_never_increase_release")) + if wrong_format || wrong_release + if include_release_info && !wrong_release && !exists("g:spec_chglog_never_increase_release") let option = confirm("Increase release? ","&Yes\n&No",1) - if (option == 1) + if option == 1 execute relline normal  let rel = substitute(strpart(getline(relline),8), '^[ ]*\([^ ]\+\)[ ]*$','\1','') @@ -171,13 +171,13 @@ if !exists("*s:ParseRpmVars") let ret = "" while (1) let start = match(a:str, "\%{", end+1) - if (start == -1) + if start == -1 let ret = ret . strpart(a:str, end+1) break endif let ret = ret . strpart(a:str, end+1, start-(end+1)) let end = match(a:str, "}", start) - if (end == -1) + if end == -1 let ret = ret . strpart(a:str, start) break endif @@ -185,7 +185,7 @@ if !exists("*s:ParseRpmVars") execute a:strline let definestr = "^[ \t]*%\\(define\\|global\\)[ \t]\\+".varname."[ \t]\\+\\(.*\\)$" let linenum = search(definestr, "bW") - if (linenum != 0) + if linenum != 0 let ret = ret . substitute(getline(linenum), definestr, "\\2", "") endif endwhile -- cgit From c1dd4e83b494d19a5ebcb7ffb936cb4649f11637 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 21:56:01 -0400 Subject: vim-patch:7e6a515ed14e Update runtime files. https://github.com/vim/vim/commit/7e6a515ed14e204fafb3dd6e98f2fb543e64aedd Omit vim9. --- runtime/ftplugin/dune.vim | 2 +- runtime/ftplugin/fstab.vim | 19 +++++++++++++++++++ runtime/ftplugin/ocaml.vim | 11 ++++++----- runtime/ftplugin/sexplib.vim | 15 +++++++++++++++ 4 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 runtime/ftplugin/fstab.vim create mode 100644 runtime/ftplugin/sexplib.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/dune.vim b/runtime/ftplugin/dune.vim index 8b1f8b4125..86c99c097f 100644 --- a/runtime/ftplugin/dune.vim +++ b/runtime/ftplugin/dune.vim @@ -1,7 +1,7 @@ " Language: Dune buildsystem " Maintainer: Markus Mottl " Anton Kochkov -" URL: https://github.com/rgrinberg/vim-ocaml +" URL: https://github.com/ocaml/vim-ocaml " Last Change: " 2018 Nov 3 - Added commentstring (Markus Mottl) " 2017 Sep 6 - Initial version (Etienne Millon) diff --git a/runtime/ftplugin/fstab.vim b/runtime/ftplugin/fstab.vim new file mode 100644 index 0000000000..3e7af9fb30 --- /dev/null +++ b/runtime/ftplugin/fstab.vim @@ -0,0 +1,19 @@ +" Vim ftplugin file +" Language: fstab file +" Maintainer: Radu Dineiu +" URL: https://raw.github.com/rid9/vim-fstab/master/ftplugin/fstab.vim +" Last Change: 2020 Dec 29 +" Version: 1.0 +" +" Credits: +" Subhaditya Nath + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal commentstring=#%s +let b:undo_ftplugin = "setlocal commentstring<" + +" vim: ts=8 ft=vim \ No newline at end of file diff --git a/runtime/ftplugin/ocaml.vim b/runtime/ftplugin/ocaml.vim index d9336421cf..793b887afc 100644 --- a/runtime/ftplugin/ocaml.vim +++ b/runtime/ftplugin/ocaml.vim @@ -5,7 +5,7 @@ " Pierre Vittet " Stefano Zacchiroli " Vincent Aravantinos -" URL: https://github.com/rgrinberg/vim-ocaml +" URL: https://github.com/ocaml/vim-ocaml " Last Change: " 2013 Oct 27 - Added commentstring (MM) " 2013 Jul 26 - load default compiler settings (MM) @@ -38,7 +38,8 @@ let s:cposet=&cpoptions set cpo&vim " Comment string -setlocal comments= +setlocal comments=sr:(*\ ,mb:\ ,ex:*) +setlocal comments^=sr:(**,mb:\ \ ,ex:*) setlocal commentstring=(*%s*) " Add mappings, unless the user didn't want this. @@ -391,8 +392,8 @@ endfunction endif endfun - " This variable contain a dictionnary of list. Each element of the dictionnary - " represent an annotation system. An annotation system is a list with: + " This variable contains a dictionary of lists. Each element of the dictionary + " represents an annotation system. An annotation system is a list with: " - annotation file name as its key " - annotation file path as first element of the contained list " - build path as second element of the contained list @@ -521,7 +522,7 @@ endfunction "c. link this stuff with what the user wants " ie. get the expression selected/under the cursor - let s:ocaml_word_char = '\w|[-]|''' + let s:ocaml_word_char = '\w|[\xc0-\xff]|''' "In: the current mode (eg. "visual", "normal", etc.) "Out: the borders of the expression we are looking for the type diff --git a/runtime/ftplugin/sexplib.vim b/runtime/ftplugin/sexplib.vim new file mode 100644 index 0000000000..27e1b28370 --- /dev/null +++ b/runtime/ftplugin/sexplib.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin file +" Language: Sexplib +" Maintainer: Markus Mottl +" URL: https://github.com/ocaml/vim-ocaml +" Last Change: +" 2017 Apr 12 - First version (MM) + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin=1 + +" Comment string +setl commentstring=;\ %s +setl comments=:; -- cgit From dd2bc06411a69917c6f4a47d0b6832104efa98e4 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 22:09:13 -0400 Subject: vim-patch:82be4849eed0 Update runtime files. https://github.com/vim/vim/commit/82be4849eed0b8fbee45bc8da99b685ec89af59a --- runtime/ftplugin/erlang.vim | 112 +++++++++++++++++++++----------------------- runtime/ftplugin/fstab.vim | 4 +- runtime/ftplugin/swift.vim | 11 ++++- runtime/ftplugin/vim.vim | 20 +++++--- 4 files changed, 79 insertions(+), 68 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/erlang.vim b/runtime/ftplugin/erlang.vim index ece11d7249..c775247f51 100644 --- a/runtime/ftplugin/erlang.vim +++ b/runtime/ftplugin/erlang.vim @@ -1,87 +1,83 @@ " Vim ftplugin file -" Language: Erlang +" Language: Erlang (http://www.erlang.org) +" Maintainer: Csaba Hoch " Author: Oscar Hellström " Contributors: Ricardo Catalinas Jiménez " Eduardo Lopez (http://github.com/tapichu) +" Arvid Bjurklint (http://github.com/slarwise) +" Last Update: 2021-Jan-08 " License: Vim license -" Version: 2012/01/25 +" URL: https://github.com/vim-erlang/vim-erlang-runtime if exists('b:did_ftplugin') - finish -else - let b:did_ftplugin = 1 -endif - -if exists('s:did_function_definitions') - call s:SetErlangOptions() - finish -else - let s:did_function_definitions = 1 + finish endif +let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim -if !exists('g:erlang_keywordprg') - let g:erlang_keywordprg = 'erl -man' -endif +let &l:keywordprg = get(g:, 'erlang_keywordprg', 'erl -man') -if !exists('g:erlang_folding') - let g:erlang_folding = 0 +if get(g:, 'erlang_folding', 0) + setlocal foldmethod=expr + setlocal foldexpr=GetErlangFold(v:lnum) + setlocal foldtext=ErlangFoldText() endif -let s:erlang_fun_begin = '^\a\w*(.*$' -let s:erlang_fun_end = '^[^%]*\.\s*\(%.*\)\?$' - -function s:SetErlangOptions() - if g:erlang_folding - setlocal foldmethod=expr - setlocal foldexpr=GetErlangFold(v:lnum) - setlocal foldtext=ErlangFoldText() - endif +setlocal comments=:%%%,:%%,:% +setlocal commentstring=%%s - setlocal comments=:%%%,:%%,:% - setlocal commentstring=%%s +setlocal formatoptions+=ro - setlocal formatoptions+=ro - let &l:keywordprg = g:erlang_keywordprg -endfunction +setlocal suffixesadd=.erl,.hrl -function GetErlangFold(lnum) - let lnum = a:lnum - let line = getline(lnum) +let &l:include = '^\s*-\%(include\|include_lib\)\s*("\zs\f*\ze")' +let &l:define = '^\s*-\%(define\|record\|type\|opaque\)' - if line =~ s:erlang_fun_end - return '<1' - endif +let s:erlang_fun_begin = '^\a\w*(.*$' +let s:erlang_fun_end = '^[^%]*\.\s*\(%.*\)\?$' - if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1 - return '1' - endif +if !exists('*GetErlangFold') + function GetErlangFold(lnum) + let lnum = a:lnum + let line = getline(lnum) - if line =~ s:erlang_fun_begin - return '>1' - endif + if line =~ s:erlang_fun_end + return '<1' + endif - return '=' -endfunction + if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1 + return '1' + endif -function ErlangFoldText() - let line = getline(v:foldstart) - let foldlen = v:foldend - v:foldstart + 1 - let lines = ' ' . foldlen . ' lines: ' . substitute(line, "[\ \t]*", '', '') - if foldlen < 10 - let lines = ' ' . lines - endif - let retval = '+' . v:folddashes . lines + if line =~ s:erlang_fun_begin + return '>1' + endif - return retval -endfunction + return '=' + endfunction +endif -call s:SetErlangOptions() +if !exists('*ErlangFoldText') + function ErlangFoldText() + let line = getline(v:foldstart) + let foldlen = v:foldend - v:foldstart + 1 + let lines = ' ' . foldlen . ' lines: ' . substitute(line, "[\ \t]*", '', '') + if foldlen < 10 + let lines = ' ' . lines + endif + let retval = '+' . v:folddashes . lines + + return retval + endfunction +endif -let b:undo_ftplugin = "setlocal foldmethod< foldexpr< foldtext<" - \ . " comments< commentstring< formatoptions<" +let b:undo_ftplugin = "setlocal keywordprg< foldmethod< foldexpr< foldtext<" + \ . " comments< commentstring< formatoptions< suffixesadd< include<" + \ . " define<" let &cpo = s:cpo_save unlet s:cpo_save + +" vim: sw=2 et diff --git a/runtime/ftplugin/fstab.vim b/runtime/ftplugin/fstab.vim index 3e7af9fb30..99805322cd 100644 --- a/runtime/ftplugin/fstab.vim +++ b/runtime/ftplugin/fstab.vim @@ -2,7 +2,7 @@ " Language: fstab file " Maintainer: Radu Dineiu " URL: https://raw.github.com/rid9/vim-fstab/master/ftplugin/fstab.vim -" Last Change: 2020 Dec 29 +" Last Change: 2021 Jan 02 " Version: 1.0 " " Credits: @@ -16,4 +16,4 @@ let b:did_ftplugin = 1 setlocal commentstring=#%s let b:undo_ftplugin = "setlocal commentstring<" -" vim: ts=8 ft=vim \ No newline at end of file +" vim: ts=8 ft=vim diff --git a/runtime/ftplugin/swift.vim b/runtime/ftplugin/swift.vim index 55678f8bfc..a86b782c22 100644 --- a/runtime/ftplugin/swift.vim +++ b/runtime/ftplugin/swift.vim @@ -6,7 +6,16 @@ " See https://swift.org/LICENSE.txt for license information " See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors " -" Vim maintainer: Emir SARI +" Vim maintainer: Emir SARI +" Last Change: 2021 Jan 08 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +let b:did_ftplugin = 1 +let b:undo_ftplugin = "setlocal comments< expandtab< tabstop< shiftwidth< smartindent<" setlocal comments=s1:/*,mb:*,ex:*/,:///,:// setlocal expandtab diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 4df0d4b59b..6759951daf 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: 2020 Aug 14 +" Last Change: 2021 Jan 05 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -48,18 +48,24 @@ setlocal isk+=# " Use :help to lookup the keyword under the cursor with K. setlocal keywordprg=:help -" Set 'comments' to format dashed lists in comments -" Avoid that #{} starts a comment. -setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",b:# +" if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>' +if "\n" .. join(getline(1, 10), "\n") =~# '\n\s*vim9\%[script]\>' + " Set 'comments' to format dashed lists in comments + setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:# + " Comments start with a double quote in a legacy script; + " with # in a Vim9 script + setlocal commentstring=\"%s +else + setlocal com=sO:\"\ -,mO:\"\ \ ,:\" + setlocal commentstring=#%s +endif + " Format comments to be up to 78 characters long if &tw == 0 setlocal tw=78 endif -" Comments start with a double quote; in Vim9 script # would also work -setlocal commentstring=\"%s - " Prefer Vim help instead of manpages. setlocal keywordprg=:help -- cgit From 8f8602d2dfc87257c1d72492aa1d285f335bb942 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 22:33:02 -0400 Subject: vim-patch:98a29d00a48e Update runtime files. https://github.com/vim/vim/commit/98a29d00a48e15a50e2850e1a29b7d475c531b0c --- runtime/ftplugin/vim.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 6759951daf..d31fff9acb 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: 2021 Jan 05 +" Last Change: 2021 Jan 12 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -52,12 +52,12 @@ setlocal keywordprg=:help if "\n" .. join(getline(1, 10), "\n") =~# '\n\s*vim9\%[script]\>' " Set 'comments' to format dashed lists in comments setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:# - " Comments start with a double quote in a legacy script; - " with # in a Vim9 script - setlocal commentstring=\"%s + " Comments starts with # in Vim9 script + setlocal commentstring=#%s else setlocal com=sO:\"\ -,mO:\"\ \ ,:\" - setlocal commentstring=#%s + " Comments starts with a double quote in legacy script + setlocal commentstring=\"%s endif -- cgit From ac83c6eba65e92d434f3245f518f869c94751e6b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 23:05:15 -0400 Subject: vim-patch:e0e391755432 Update runtime files. https://github.com/vim/vim/commit/e0e3917554327f2524066f89fbbef9c83c1535da --- runtime/ftplugin/ada.vim | 69 ++++++++++++++++++++-------------------- runtime/ftplugin/basic.vim | 27 ++++++++++++++++ runtime/ftplugin/bzl.vim | 4 ++- runtime/ftplugin/framescript.vim | 6 ++-- runtime/ftplugin/freebasic.vim | 13 ++++++++ runtime/ftplugin/hamster.vim | 7 ++-- runtime/ftplugin/ocaml.vim | 4 ++- runtime/ftplugin/tidy.vim | 32 +++++++++++++++++++ runtime/ftplugin/vim.vim | 9 ++++-- 9 files changed, 128 insertions(+), 43 deletions(-) create mode 100644 runtime/ftplugin/basic.vim create mode 100644 runtime/ftplugin/freebasic.vim create mode 100644 runtime/ftplugin/tidy.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/ada.vim b/runtime/ftplugin/ada.vim index 1f2d690b95..688d912126 100644 --- a/runtime/ftplugin/ada.vim +++ b/runtime/ftplugin/ada.vim @@ -155,40 +155,41 @@ if exists("g:ada_abbrev") endif " Section: Commands, Mapping, Menus {{{1 -" -call ada#Map_Popup ( - \ 'Tag.List', - \ 'l', - \ 'call ada#List_Tag ()') -call ada#Map_Popup ( - \'Tag.Jump', - \'j', - \'call ada#Jump_Tag ()') -call ada#Map_Menu ( - \'Tag.Create File', - \':AdaTagFile', - \'call ada#Create_Tags (''file'')') -call ada#Map_Menu ( - \'Tag.Create Dir', - \':AdaTagDir', - \'call ada#Create_Tags (''dir'')') - -call ada#Map_Menu ( - \'Highlight.Toggle Space Errors', - \ ':AdaSpaces', - \'call ada#Switch_Syntax_Option (''space_errors'')') -call ada#Map_Menu ( - \'Highlight.Toggle Lines Errors', - \ ':AdaLines', - \'call ada#Switch_Syntax_Option (''line_errors'')') -call ada#Map_Menu ( - \'Highlight.Toggle Rainbow Color', - \ ':AdaRainbow', - \'call ada#Switch_Syntax_Option (''rainbow_color'')') -call ada#Map_Menu ( - \'Highlight.Toggle Standard Types', - \ ':AdaTypes', - \'call ada#Switch_Syntax_Option (''standard_types'')') +if !exists(':AdaTagFile') + call ada#Map_Popup ( + \ 'Tag.List', + \ 'l', + \ 'call ada#List_Tag ()') + call ada#Map_Popup ( + \'Tag.Jump', + \'j', + \'call ada#Jump_Tag ()') + call ada#Map_Menu ( + \'Tag.Create File', + \':AdaTagFile', + \'call ada#Create_Tags (''file'')') + call ada#Map_Menu ( + \'Tag.Create Dir', + \':AdaTagDir', + \'call ada#Create_Tags (''dir'')') + + call ada#Map_Menu ( + \'Highlight.Toggle Space Errors', + \ ':AdaSpaces', + \'call ada#Switch_Syntax_Option (''space_errors'')') + call ada#Map_Menu ( + \'Highlight.Toggle Lines Errors', + \ ':AdaLines', + \'call ada#Switch_Syntax_Option (''line_errors'')') + call ada#Map_Menu ( + \'Highlight.Toggle Rainbow Color', + \ ':AdaRainbow', + \'call ada#Switch_Syntax_Option (''rainbow_color'')') + call ada#Map_Menu ( + \'Highlight.Toggle Standard Types', + \ ':AdaTypes', + \'call ada#Switch_Syntax_Option (''standard_types'')') +endif " 1}}} " Reset cpoptions diff --git a/runtime/ftplugin/basic.vim b/runtime/ftplugin/basic.vim new file mode 100644 index 0000000000..c6ec254dfc --- /dev/null +++ b/runtime/ftplugin/basic.vim @@ -0,0 +1,27 @@ +" Vim filetype plugin file +" Language: BASIC +" Maintainer: Doug Kearns +" Last Change: 2015 Jan 10 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal comments=:REM,:' +setlocal commentstring='\ %s +setlocal formatoptions-=t formatoptions+=croql + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "BASIC Source Files (*.bas)\t*.bas\n" . + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setl fo< com< cms< sua<" . + \ " | unlet! b:browsefilter" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/bzl.vim b/runtime/ftplugin/bzl.vim index 0296b0c0b8..8ab876e9d6 100644 --- a/runtime/ftplugin/bzl.vim +++ b/runtime/ftplugin/bzl.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Bazel (http://bazel.io) " Maintainer: David Barnett (https://github.com/google/vim-ft-bzl) -" Last Change: 2015 Aug 11 +" Last Change: 2021 Jan 19 "" " @section Introduction, intro @@ -51,6 +51,8 @@ if get(g:, 'ft_bzl_fold', 0) endif if exists('*BzlFoldText') + let &cpo = s:save_cpo + unlet s:save_cpo finish endif diff --git a/runtime/ftplugin/framescript.vim b/runtime/ftplugin/framescript.vim index 48fe0ace7c..66802cad0d 100644 --- a/runtime/ftplugin/framescript.vim +++ b/runtime/ftplugin/framescript.vim @@ -3,14 +3,14 @@ " Previous Maintainer: Nikolai Weibull " Latest Revision: 2008-07-19 -let s:cpo_save = &cpo -set cpo&vim - 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 com< cms< fo< inc< | unlet! b:matchwords" setlocal comments=s1:/*,mb:*,ex:*/,:// commentstring=/*\ %s\ */ diff --git a/runtime/ftplugin/freebasic.vim b/runtime/ftplugin/freebasic.vim new file mode 100644 index 0000000000..a2bb459f20 --- /dev/null +++ b/runtime/ftplugin/freebasic.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin file +" Language: FreeBasic +" Maintainer: Doug Kearns +" Last Change: 2015 Jan 10 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +runtime! ftplugin/basic.vim + +" vim: ts=8 diff --git a/runtime/ftplugin/hamster.vim b/runtime/ftplugin/hamster.vim index 6c0630fe04..5446e72286 100644 --- a/runtime/ftplugin/hamster.vim +++ b/runtime/ftplugin/hamster.vim @@ -2,7 +2,7 @@ " Language: Hamster Script " Version: 2.0.6.0 " Maintainer: David Fishburn -" Last Change: 2017 Mar 18 +" Last Change: 2021 Jan 19 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -57,6 +57,9 @@ if exists("loaded_matchit") endif setlocal ignorecase + let &cpo = s:cpo_save unlet s:cpo_save -setlocal cpo+=M " makes \%( match \) + +" Disabled, 'cpo' is a global option. +" setlocal cpo+=M " makes \%( match \) diff --git a/runtime/ftplugin/ocaml.vim b/runtime/ftplugin/ocaml.vim index 793b887afc..8a628604fa 100644 --- a/runtime/ftplugin/ocaml.vim +++ b/runtime/ftplugin/ocaml.vim @@ -159,6 +159,8 @@ let b:undo_ftplugin = "setlocal efm< foldmethod< foldexpr<" " - Only definitions below, executed once ------------------------------------- if exists("*OMLetFoldLevel") + let &cpoptions = s:cposet + unlet s:cposet finish endif @@ -635,7 +637,7 @@ endfunction nnoremap OCamlPrintType :call Ocaml_print_type("normal") xnoremap OCamlPrintType :call Ocaml_print_type("visual")`< -let &cpoptions=s:cposet +let &cpoptions = s:cposet unlet s:cposet " vim:sw=2 fdm=indent diff --git a/runtime/ftplugin/tidy.vim b/runtime/ftplugin/tidy.vim new file mode 100644 index 0000000000..470548d83a --- /dev/null +++ b/runtime/ftplugin/tidy.vim @@ -0,0 +1,32 @@ +" Vim filetype plugin file +" Language: HMTL Tidy Configuration +" Maintainer: Doug Kearns +" Last Change: 2020 Sep 4 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal comments=:#,:// +setlocal commentstring=#\ %s +setlocal formatoptions-=t formatoptions+=croql + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "HTML Tidy Files (tidyrc, .tidyrc, tidy.conf)\ttidyrc;.tidyrc;tidy.conf\n" . + \ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" . + \ "XHTML Files (*.xhtml, *.xhtm)\t*.xhtml;*.xhtm\n" . + \ "XML Files (*.xml)\t*.xml\n" . + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setl fo< com< cms<" . + \ " | unlet! b:browsefilter" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index d31fff9acb..5593fefa8a 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: 2021 Jan 12 +" Last Change: 2021 Jan 23 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -92,8 +92,13 @@ endif " Let the matchit plugin know what items can be matched. if exists("loaded_matchit") let b:match_ignorecase = 0 + " "func" can also be used as a type: + " var Ref: func + " or to list functions: + " func name + " require a parenthesis following, then there can be an "endfunc". let b:match_words = - \ '\<\%(fu\%[nction]\|def\)\>)\@!:\:\<\%(endf\%[unction]\|enddef\)\>,' . + \ '\<\%(fu\%[nction]\|def\)\s\+\S\+(:\:\<\%(endf\%[unction]\|enddef\)\>,' . \ '\<\(wh\%[ile]\|for\)\>:\:\:\,' . \ '\:\:\,' . \ '{:},' . -- cgit From 2081504a331f2ca97922056f6b42b8d0e6c2e306 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 1 May 2021 23:21:50 -0400 Subject: vim-patch:942db23c9cb7 Update runtime files https://github.com/vim/vim/commit/942db23c9cb7532d68048530d749eb84ca94d0cd Omit po files. --- runtime/ftplugin/clojure.vim | 31 ++++++++----------------------- runtime/ftplugin/vim.vim | 4 ++-- 2 files changed, 10 insertions(+), 25 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/clojure.vim b/runtime/ftplugin/clojure.vim index 217711f26e..cb75506dbb 100644 --- a/runtime/ftplugin/clojure.vim +++ b/runtime/ftplugin/clojure.vim @@ -1,11 +1,11 @@ " Vim filetype plugin file -" Language: Clojure -" Author: Meikel Brandmeyer -" -" Maintainer: Sung Pae -" URL: https://github.com/guns/vim-clojure-static -" License: Same as Vim -" Last Change: 18 July 2016 +" Language: Clojure +" Maintainer: Alex Vear +" Former Maintainers: Sung Pae +" Meikel Brandmeyer +" URL: https://github.com/clojure-vim/clojure.vim +" License: Vim (see :h license) +" Last Change: 2021-02-13 if exists("b:did_ftplugin") finish @@ -43,7 +43,7 @@ setlocal commentstring=;\ %s " specially and hence are not indented specially. " " -*- LISPWORDS -*- -" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-011/clj/src/vim_clojure_static/generate.clj +" Generated from https://github.com/clojure-vim/clojure.vim/blob/f8594e7030cdfb0b7990ac92953c77a08a7220f0/clj/src/vim_clojure_static/generate.clj setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test " Provide insert mode completions for special forms and clojure.core. As @@ -57,21 +57,6 @@ for s:setting in ['omnifunc', 'completefunc'] endif endfor -" Take all directories of the CLOJURE_SOURCE_DIRS environment variable -" and add them to the path option. -" -" This is a legacy option for VimClojure users. -if exists('$CLOJURE_SOURCE_DIRS') - for s:dir in split($CLOJURE_SOURCE_DIRS, (has("win32") || has("win64")) ? ';' : ':') - let s:dir = fnameescape(s:dir) - " Whitespace escaping for Windows - let s:dir = substitute(s:dir, '\', '\\\\', 'g') - let s:dir = substitute(s:dir, '\ ', '\\ ', 'g') - execute "setlocal path+=" . s:dir . "/**" - endfor - let b:undo_ftplugin .= ' | setlocal path<' -endif - " Skip brackets in ignored syntax regions when using the % command if exists('loaded_matchit') let b:match_words = &matchpairs diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 5593fefa8a..a842114433 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: 2021 Jan 23 +" Last Change: 2021 Feb 07 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -98,7 +98,7 @@ if exists("loaded_matchit") " func name " require a parenthesis following, then there can be an "endfunc". let b:match_words = - \ '\<\%(fu\%[nction]\|def\)\s\+\S\+(:\:\<\%(endf\%[unction]\|enddef\)\>,' . ++ \ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+(:\:\<\%(endf\%[unction]\|enddef\)\>,' . \ '\<\(wh\%[ile]\|for\)\>:\:\:\,' . \ '\:\:\,' . \ '{:},' . -- cgit From 6a8436065ca7282569fd4d96b1c02a8ba8eaacf1 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 2 May 2021 10:19:25 -0400 Subject: vim-patch:9faec4e3d439 Update runtime files. https://github.com/vim/vim/commit/9faec4e3d439968e21ad74e917aebb289df8f849 Omit vim9. --- runtime/ftplugin/lisp.vim | 4 +--- runtime/ftplugin/vim.vim | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/lisp.vim b/runtime/ftplugin/lisp.vim index 130f30b146..9825d2484a 100644 --- a/runtime/ftplugin/lisp.vim +++ b/runtime/ftplugin/lisp.vim @@ -14,13 +14,11 @@ endif " Don't load another plugin for this buffer let b:did_ftplugin = 1 -setl comments=:; +setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,mb:\|,ex:\|# setl define=^\\s*(def\\k* setl formatoptions-=t setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94 setl lisp setl commentstring=;%s -setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|# - let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp< commentstring<" diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index a842114433..61fabcbb32 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: 2021 Feb 07 +" Last Change: 2021 Feb 20 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -55,7 +55,7 @@ if "\n" .. join(getline(1, 10), "\n") =~# '\n\s*vim9\%[script]\>' " Comments starts with # in Vim9 script setlocal commentstring=#%s else - setlocal com=sO:\"\ -,mO:\"\ \ ,:\" + setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\" " Comments starts with a double quote in legacy script setlocal commentstring=\"%s endif -- cgit From eea3a692c652ba6d4db868cd4f3cfdebb0f65861 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 2 May 2021 10:24:39 -0400 Subject: vim-patch:c8cdf0f80b3c Update runtime files. https://github.com/vim/vim/commit/c8cdf0f80b3cfd88a4490d80572062c1fd1a96ca --- runtime/ftplugin/poke.vim | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 runtime/ftplugin/poke.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/poke.vim b/runtime/ftplugin/poke.vim new file mode 100644 index 0000000000..2be86695c8 --- /dev/null +++ b/runtime/ftplugin/poke.vim @@ -0,0 +1,32 @@ +" Vim filetype plugin file +" Language: GNU Poke +" Maintainer: Doug Kearns +" Last Change: 2021 March 11 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// +setlocal commentstring=//\ %s +setlocal formatoptions-=t formatoptions+=croql + +setlocal include=load +setlocal suffixesadd=.pk + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Poke Files (*.pk)\t*.pk\n" . + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setl fo< com< cms< inc< sua<" . + \ " | unlet! b:browsefilter" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 -- cgit From b8f3ef10c943730df8d82f229bc8b1da3a3c8294 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 2 May 2021 11:10:25 -0400 Subject: vim-patch:dad4473f02e1 Update runtime files. https://github.com/vim/vim/commit/dad4473f02e1fec86d43a2fc094536a4b27d3b25 Omit :echoconsole. Patch v8.2.2638 is not ported. --- runtime/ftplugin/lisp.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/lisp.vim b/runtime/ftplugin/lisp.vim index 9825d2484a..db3ac96631 100644 --- a/runtime/ftplugin/lisp.vim +++ b/runtime/ftplugin/lisp.vim @@ -4,7 +4,7 @@ " URL: http://sites.google.com/site/khorser/opensource/vim " Original author: Dorai Sitaram " Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html -" Last Change: Oct 23, 2013 +" Last Change: Mar 10, 2021 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") -- cgit From abb13dde980b21b39e9d700370e3e82835007cb6 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 2 May 2021 11:52:52 -0400 Subject: vim-patch:130cbfc31235 Update runtime files https://github.com/vim/vim/commit/130cbfc31235c6cb52ffe718ea0a5bb50fbbc9fd --- runtime/ftplugin/fortran.vim | 15 ++++++++--- runtime/ftplugin/ps1.vim | 59 ++++++++++++++++++++++++++++++++++++++++++++ runtime/ftplugin/ps1xml.vim | 34 +++++++++++++++++++++++++ 3 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 runtime/ftplugin/ps1.vim create mode 100644 runtime/ftplugin/ps1xml.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/fortran.vim b/runtime/ftplugin/fortran.vim index b9ba3c4722..26dc90a184 100644 --- a/runtime/ftplugin/fortran.vim +++ b/runtime/ftplugin/fortran.vim @@ -1,13 +1,13 @@ " Vim settings file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66) -" Version: (v52) 2020 October 07 +" Version: (v53) 2021 April 06 " Maintainer: Ajit J. Thakkar ; " Usage: For instructions, do :help fortran-plugin from Vim " Credits: " Version 0.1 was created in September 2000 by Ajit Thakkar. " Since then, useful suggestions and contributions have been made, in order, by: " Stefano Zacchiroli, Hendrik Merx, Ben Fritz, David Barnett, Eisuke Kawashima, -" and Doug Kearns. +" Doug Kearns, and Fritz Reese. " Only do these settings when not done yet for this buffer if exists("b:did_ftplugin") @@ -66,12 +66,19 @@ endif " Set comments and textwidth according to source type if (b:fortran_fixed_source == 1) setlocal comments=:!,:*,:C - " Fixed format requires a textwidth of 72 for code - setlocal tw=72 + " Fixed format requires a textwidth of 72 for code, + " but some vendor extensions allow longer lines + if exists("fortran_extended_line_length") + setlocal tw=132 + elseif exists("fortran_cardimage_line_length") + setlocal tw=80 + else + setlocal tw=72 " If you need to add "&" on continued lines so that the code is " compatible with both free and fixed format, then you should do so " in column 73 and uncomment the next line " setlocal tw=73 + endif else setlocal comments=:! " Free format allows a textwidth of 132 diff --git a/runtime/ftplugin/ps1.vim b/runtime/ftplugin/ps1.vim new file mode 100644 index 0000000000..aac3bc9903 --- /dev/null +++ b/runtime/ftplugin/ps1.vim @@ -0,0 +1,59 @@ +" Vim filetype plugin file +" Language: Windows PowerShell +" URL: https://github.com/PProvost/vim-ps1 +" Last Change: 2021 Apr 02 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") | finish | endif + +" Don't load another plug-in for this buffer +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal tw=0 +setlocal commentstring=#%s +setlocal formatoptions=tcqro +" Enable autocompletion of hyphenated PowerShell commands, +" e.g. Get-Content or Get-ADUser +setlocal iskeyword+=- + +" Change the browse dialog on Win32 to show mainly PowerShell-related files +if has("gui_win32") + let b:browsefilter = + \ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" . + \ "PowerShell Script Files (*.ps1)\t*.ps1\n" . + \ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" . + \ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" . + \ "All Files (*.*)\t*.*\n" +endif + +" Look up keywords by Get-Help: +" check for PowerShell Core in Windows, Linux or MacOS +if executable('pwsh') | let s:pwsh_cmd = 'pwsh' + " on Windows Subsystem for Linux, check for PowerShell Core in Windows +elseif exists('$WSLENV') && executable('pwsh.exe') | let s:pwsh_cmd = 'pwsh.exe' + " check for PowerShell <= 5.1 in Windows +elseif executable('powershell.exe') | let s:pwsh_cmd = 'powershell.exe' +endif + +if exists('s:pwsh_cmd') + if !has('gui_running') && executable('less') && + \ !(exists('$ConEmuBuild') && &term =~? '^xterm') + " For exclusion of ConEmu, see https://github.com/Maximus5/ConEmu/issues/2048 + command! -buffer -nargs=1 GetHelp silent exe '!' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "" | ' . (has('unix') ? 'LESS= less' : 'less') | redraw! + elseif has('terminal') + command! -buffer -nargs=1 GetHelp silent exe 'term ' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full ""' . (executable('less') ? ' | less' : '') + else + command! -buffer -nargs=1 GetHelp echo system(s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full ') + endif +endif +setlocal keywordprg=:GetHelp + +" Undo the stuff we changed +let b:undo_ftplugin = "setlocal tw< cms< fo< iskeyword< keywordprg<" . + \ " | unlet! b:browsefilter" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/ftplugin/ps1xml.vim b/runtime/ftplugin/ps1xml.vim new file mode 100644 index 0000000000..837a3309b4 --- /dev/null +++ b/runtime/ftplugin/ps1xml.vim @@ -0,0 +1,34 @@ +" Vim filetype plugin file +" Language: Windows PowerShell +" URL: https://github.com/PProvost/vim-ps1 +" Last Change: 2021 Apr 02 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") | finish | endif + +" Don't load another plug-in for this buffer +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal tw=0 +setlocal commentstring=#%s +setlocal formatoptions=tcqro + +" Change the browse dialog on Win32 to show mainly PowerShell-related files +if has("gui_win32") + let b:browsefilter = + \ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" . + \ "PowerShell Script Files (*.ps1)\t*.ps1\n" . + \ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" . + \ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" . + \ "All Files (*.*)\t*.*\n" +endif + +" Undo the stuff we changed +let b:undo_ftplugin = "setlocal tw< cms< fo<" . + \ " | unlet! b:browsefilter" + +let &cpo = s:cpo_save +unlet s:cpo_save -- cgit From 7e36c9a2d3ddcb8b31e318e25767cfb32fa69391 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 2 May 2021 12:20:57 -0400 Subject: vim-patch:56994d215815 Update runtime files. https://github.com/vim/vim/commit/56994d215815139207f3c5ce02a1720e44e93c09 --- runtime/ftplugin/gprof.vim | 4 ++-- runtime/ftplugin/m3build.vim | 24 ++++++++++++++++++++++++ runtime/ftplugin/m3quake.vim | 33 +++++++++++++++++++++++++++++++++ runtime/ftplugin/modula2.vim | 39 +++++++++++++++++++++++++++++++++++++++ runtime/ftplugin/modula3.vim | 38 ++++++++++++++++++++++++++++++++++++++ runtime/ftplugin/vim.vim | 10 +++++----- 6 files changed, 141 insertions(+), 7 deletions(-) create mode 100644 runtime/ftplugin/m3build.vim create mode 100644 runtime/ftplugin/m3quake.vim create mode 100644 runtime/ftplugin/modula2.vim create mode 100644 runtime/ftplugin/modula3.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/gprof.vim b/runtime/ftplugin/gprof.vim index 750751c372..d4547ae9a6 100644 --- a/runtime/ftplugin/gprof.vim +++ b/runtime/ftplugin/gprof.vim @@ -1,6 +1,6 @@ " Language: gprof " Maintainer: Dominique Pelle -" Last Change: 2013 Jun 09 +" Last Change: 2021 Apr 08 " When cursor is on one line of the gprof call graph, " calling this function jumps to this function in the call graph. @@ -16,7 +16,7 @@ fun! GprofJumpToFunctionIndex() norm! $y% call search('^' . escape(@", '[]'), 'sw') norm! zz - elseif l:line =~ '^\(\s\+[0-9\.]\+\)\{3}\s\+' + elseif l:line =~ '^\(\s*[0-9\.]\+\)\{3}\s\+' " We're in line in the flat profile. norm! 55|eby$ call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW') diff --git a/runtime/ftplugin/m3build.vim b/runtime/ftplugin/m3build.vim new file mode 100644 index 0000000000..9e1e169d38 --- /dev/null +++ b/runtime/ftplugin/m3build.vim @@ -0,0 +1,24 @@ +" Vim filetype plugin file +" Language: Modula-3 Makefile +" Maintainer: Doug Kearns +" Last Change: 2021 April 15 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +runtime! ftplugin/m3quake.vim + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Modula-3 Makefile (m3makefile m3overrides)\tm3makefile;m3overrides\n" .. + \ "All Files (*.*)\t*.*\n" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/runtime/ftplugin/m3quake.vim b/runtime/ftplugin/m3quake.vim new file mode 100644 index 0000000000..627aabdc3e --- /dev/null +++ b/runtime/ftplugin/m3quake.vim @@ -0,0 +1,33 @@ +" Vim filetype plugin file +" Language: Modula-3 Quake +" Maintainer: Doug Kearns +" Last Change: 2021 April 15 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal comments=s1:/*,mb:*,ex:*/,:% +setlocal commentstring=%\ %s +setlocal formatoptions-=t formatoptions+=croql + +if exists("loaded_matchit") && !exists("b:match_words") + let b:match_words = '\<\%(proc\|if\|foreach\)\>:\:\' +endif + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Modula-3 Quake Source Files (*.quake)\t*.quake\n" .. + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setl fo< com< cms< " .. + \ "| unlet! b:browsefilter b:match_words" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/runtime/ftplugin/modula2.vim b/runtime/ftplugin/modula2.vim new file mode 100644 index 0000000000..1d0e81ee70 --- /dev/null +++ b/runtime/ftplugin/modula2.vim @@ -0,0 +1,39 @@ +" Vim filetype plugin file +" Language: Modula-2 +" Maintainer: Doug Kearns +" Last Change: 2021 Apr 08 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal comments=s0:(*,mb:\ ,ex:*) +setlocal commentstring=(*%s*) +setlocal formatoptions-=t formatoptions+=croql + +if exists("loaded_matchit") && !exists("b:match_words") + " The second branch of the middle pattern is intended to match CASE labels + let b:match_words = '\:\,' .. + \ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOOP\|WHILE\|WITH\)\>' .. + \ ':' .. + \ '\<\%(ELSIF\|ELSE\)\>\|\%(^\s*\)\@<=\w\+\%(\s*\,\s*\w\+\)\=\s*\:=\@!' .. + \ ':' .. + \ '\' +endif + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Modula-2 Source Files (*.def *.mod)\t*.def;*.mod\n" .. + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setl com< cms< fo< " .. + \ "| unlet! b:browsefilter b:match_words" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/runtime/ftplugin/modula3.vim b/runtime/ftplugin/modula3.vim new file mode 100644 index 0000000000..fc9eb57949 --- /dev/null +++ b/runtime/ftplugin/modula3.vim @@ -0,0 +1,38 @@ +" Vim filetype plugin file +" Language: Modula-3 +" Maintainer: Doug Kearns +" Last Change: 2021 Apr 08 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal comments=s0:(*,mb:\ ,ex:*) +setlocal commentstring=(*%s*) +setlocal formatoptions-=t formatoptions+=croql + +if exists("loaded_matchit") && !exists("b:match_words") + let b:match_words = '\:\,' .. + \ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOCK\|LOOP\|TRY\|TYPECASE\|WHILE\|WITH\)\>' .. + \ ':' .. + \ '\<\%(ELSIF\|ELSE\|EXCEPT\|FINALLY\)\>\|\%(^\s*\)\@<=\S.*=>' .. + \ ':' .. + \ '\' +endif + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Modula-3 Source Files (*.m3)\t*.m3\n" .. + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = "setl com< cms< fo< " .. + \ "| unlet! b:browsefilter b:match_words" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 61fabcbb32..64b64b45e3 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: 2021 Feb 20 +" Last Change: 2021 Apr 11 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -98,11 +98,11 @@ if exists("loaded_matchit") " func name " require a parenthesis following, then there can be an "endfunc". let b:match_words = -+ \ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+(:\:\<\%(endf\%[unction]\|enddef\)\>,' . - \ '\<\(wh\%[ile]\|for\)\>:\:\:\,' . - \ '\:\:\,' . + \ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+(:\%(\%(^\||\)\s*\)\@<=\:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' . + \ '\<\(wh\%[ile]\|for\)\>:\%(\%(^\||\)\s*\)\@<=\:\%(\%(^\||\)\s*\)\@<=\:\%(\%(^\||\)\s*\)\@<=\,' . + \ '\:\%(\%(^\||\)\s*\)\@<=\:\%(\%(^\||\)\s*\)\@<=\,' . \ '{:},' . - \ '\:\:\:\,' . + \ '\:\%(\%(^\||\)\s*\)\@<=\:\%(\%(^\||\)\s*\)\@<=\:\%(\%(^\||\)\s*\)\@<=\,' . \ '\\)\@!\S:\,' " Ignore syntax region commands and settings, any 'en*' would clobber " if-endif. -- cgit From 3bc852cabf5326079c710c772d5e925f3b151c3a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 2 May 2021 12:45:09 -0400 Subject: vim-patch:11e3c5ba8203 Update runtime files https://github.com/vim/vim/commit/11e3c5ba820325b69cb56f70e13c21d7b8808d33 --- runtime/ftplugin/perl6.vim | 77 --------------------------- runtime/ftplugin/r.vim | 4 +- runtime/ftplugin/raku.vim | 127 ++++++++++++++++++++++++++++++++++++++++++++ runtime/ftplugin/rhelp.vim | 4 +- runtime/ftplugin/rmd.vim | 4 +- runtime/ftplugin/rnoweb.vim | 4 +- runtime/ftplugin/rrst.vim | 4 +- 7 files changed, 137 insertions(+), 87 deletions(-) delete mode 100644 runtime/ftplugin/perl6.vim create mode 100644 runtime/ftplugin/raku.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/perl6.vim b/runtime/ftplugin/perl6.vim deleted file mode 100644 index 0467bea0c2..0000000000 --- a/runtime/ftplugin/perl6.vim +++ /dev/null @@ -1,77 +0,0 @@ -" Vim filetype plugin file -" Language: Perl 6 -" Maintainer: vim-perl -" Homepage: https://github.com/vim-perl/vim-perl -" Bugs/requests: https://github.com/vim-perl/vim-perl/issues -" Last Change: 2020 Apr 15 -" Contributors: Hinrik Örn Sigurðsson -" -" Based on ftplugin/perl.vim by Dan Sharp - -if exists("b:did_ftplugin") | finish | endif -let b:did_ftplugin = 1 - -" Make sure the continuation lines below do not cause problems in -" compatibility mode. -let s:save_cpo = &cpo -set cpo-=C - -setlocal formatoptions-=t -setlocal formatoptions+=crqol -setlocal keywordprg=p6doc - -setlocal comments=:# -setlocal commentstring=#%s - -" Change the browse dialog on Win32 to show mainly Perl-related files -if has("gui_win32") - let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" . - \ "Perl Modules (*.pm)\t*.pm\n" . - \ "Perl Documentation Files (*.pod)\t*.pod\n" . - \ "All Files (*.*)\t*.*\n" -endif - -" Provided by Ned Konz -"--------------------------------------------- -setlocal include=\\<\\(use\\\|require\\)\\> -setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','') -setlocal define=[^A-Za-z_] - -" The following line changes a global variable but is necessary to make -" gf and similar commands work. Thanks to Andrew Pimlott for pointing out -" the problem. If this causes a " problem for you, add an -" after/ftplugin/perl6.vim file that contains -" set isfname-=: -set isfname+=: -setlocal iskeyword=48-57,_,A-Z,a-z,:,- - -" Set this once, globally. -if !exists("perlpath") - if executable("perl6") - try - if &shellxquote != '"' - let perlpath = system('perl6 -e "@*INC.join(q/,/).say"') - else - let perlpath = system("perl6 -e '@*INC.join(q/,/).say'") - endif - let perlpath = substitute(perlpath,',.$',',,','') - catch /E145:/ - let perlpath = ".,," - endtry - else - " If we can't call perl to get its path, just default to using the - " current directory and the directory of the current file. - let perlpath = ".,," - endif -endif - -let &l:path=perlpath -"--------------------------------------------- - -" Undo the stuff we changed. -let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk<" . - \ " | unlet! b:browsefilter" - -" Restore the saved compatibility options. -let &cpo = s:save_cpo -unlet s:save_cpo diff --git a/runtime/ftplugin/r.vim b/runtime/ftplugin/r.vim index 4ea3073922..a78afa2e7e 100644 --- a/runtime/ftplugin/r.vim +++ b/runtime/ftplugin/r.vim @@ -2,7 +2,7 @@ " Language: R " Maintainer: Jakson Alves de Aquino " Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Tue Apr 07, 2015 04:38PM +" Last Change: Sat Aug 15, 2020 11:37AM " Only do this when not yet done for this buffer if exists("b:did_ftplugin") @@ -20,7 +20,7 @@ setlocal formatoptions-=t setlocal commentstring=#\ %s setlocal comments=:#',:###,:##,:# -if has("gui_win32") && !exists("b:browsefilter") +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "R Source Files (*.R)\t*.R\n" . \ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst)\t*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . \ "All Files (*.*)\t*.*\n" diff --git a/runtime/ftplugin/raku.vim b/runtime/ftplugin/raku.vim new file mode 100644 index 0000000000..941222bd38 --- /dev/null +++ b/runtime/ftplugin/raku.vim @@ -0,0 +1,127 @@ +" Vim filetype plugin file +" Language: Raku +" Maintainer: vim-perl +" Homepage: https://github.com/Raku/vim-raku +" Bugs/requests: https://github.com/Raku/vim-raku/issues +" Last Change: 2021-04-16 +" Contributors: Hinrik Örn Sigurðsson +" +" Based on ftplugin/perl.vim by Dan Sharp + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +" Make sure the continuation lines below do not cause problems in +" compatibility mode. +let s:save_cpo = &cpo +set cpo-=C + +setlocal formatoptions-=t +setlocal formatoptions+=crqol +setlocal keywordprg=p6doc + +setlocal comments=:#\|,:#=,:# +setlocal commentstring=#%s + +" Provided by Ned Konz +"--------------------------------------------- +setlocal include=\\<\\(use\\\|require\\)\\> +setlocal includeexpr=substitute(v:fname,'::','/','g') +setlocal suffixesadd=.rakumod,.rakudoc,.pm6,.pm +setlocal define=[^A-Za-z_] + +" The following line changes a global variable but is necessary to make +" gf and similar commands work. Thanks to Andrew Pimlott for pointing out +" the problem. If this causes a problem for you, add an +" after/ftplugin/raku.vim file that contains +" set isfname-=: +set isfname+=: +setlocal iskeyword=@,48-57,_,192-255,- + +" Raku exposes its CompUnits through $*REPO, but mapping module names to +" compunit paths is nontrivial. Probably it's more convenient to rely on +" people using zef, which has a handy store of sources for modules it has +" installed. +func s:compareReverseFtime(a, b) + let atime = getftime(a:a) + let btime = getftime(a:b) + return atime > btime ? -1 : atime == btime ? 0 : 1 +endfunc + +let &l:path = "lib,." +if exists('$RAKULIB') + let &l:path = &l:path . "," . $RAKULIB +endif +let &l:path = &l:path . "," . join( + \ sort(glob("~/.zef/store/*/*/lib", 0, 1), "s:compareReverseFtime"), + \ ',') + +" Convert ascii-based ops into their single-character unicode equivalent +if get(g:, 'raku_unicode_abbrevs', 0) + iabbrev !(<) ⊄ + iabbrev !(<=) ⊈ + iabbrev !(>) ⊅ + iabbrev !(>=) ⊉ + iabbrev !(cont) ∌ + iabbrev !(elem) ∉ + iabbrev != ≠ + iabbrev (&) ∩ + iabbrev (+) ⊎ + iabbrev (-) ∖ + iabbrev (.) ⊍ + iabbrev (<) ⊂ + iabbrev (<+) ≼ + iabbrev (<=) ⊆ + iabbrev (>) ⊃ + iabbrev (>+) ≽ + iabbrev (>=) ⊇ + iabbrev (\|) ∪ + iabbrev (^) ⊖ + iabbrev (atomic) ⚛ + iabbrev (cont) ∋ + iabbrev (elem) ∈ + iabbrev * × + iabbrev **0 ⁰ + iabbrev **1 ¹ + iabbrev **2 ² + iabbrev **3 ³ + iabbrev **4 ⁴ + iabbrev **5 ⁵ + iabbrev **6 ⁶ + iabbrev **7 ⁷ + iabbrev **8 ⁸ + iabbrev **9 ⁹ + iabbrev ... … + iabbrev / ÷ + iabbrev << « + iabbrev <<[=]<< «=« + iabbrev <<[=]>> «=» + iabbrev <= ≤ + iabbrev =~= ≅ + iabbrev >= ≥ + iabbrev >> » + iabbrev >>[=]<< »=« + iabbrev >>[=]>> »=» + iabbrev Inf ∞ + iabbrev atomic-add-fetch ⚛+= + iabbrev atomic-assign ⚛= + iabbrev atomic-fetch ⚛ + iabbrev atomic-dec-fetch --⚛ + iabbrev atomic-fetch-dec ⚛-- + iabbrev atomic-fetch-inc ⚛++ + iabbrev atomic-inc-fetch ++⚛ + iabbrev atomic-sub-fetch ⚛−= + iabbrev e 𝑒 + iabbrev o ∘ + iabbrev pi π + iabbrev set() ∅ + iabbrev tau τ +endif + +" Undo the stuff we changed. +let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< isk< kp< path<" . + \ " | unlet! b:browsefilter" + +" Restore the saved compatibility options. +let &cpo = s:save_cpo +unlet s:save_cpo diff --git a/runtime/ftplugin/rhelp.vim b/runtime/ftplugin/rhelp.vim index fdac38f3e9..d0b546d62d 100644 --- a/runtime/ftplugin/rhelp.vim +++ b/runtime/ftplugin/rhelp.vim @@ -2,7 +2,7 @@ " Language: R help file " Maintainer: Jakson Alves de Aquino " Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Tue Apr 07, 2015 04:37PM +" Last Change: Sat Aug 15, 2020 12:01PM " Only do this when not yet done for this buffer if exists("b:did_ftplugin") @@ -17,7 +17,7 @@ set cpo&vim setlocal iskeyword=@,48-57,_,. -if has("gui_win32") && !exists("b:browsefilter") +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . \ "All Files (*.*)\t*.*\n" endif diff --git a/runtime/ftplugin/rmd.vim b/runtime/ftplugin/rmd.vim index 7b0db8dbb5..2ee72ffc6c 100644 --- a/runtime/ftplugin/rmd.vim +++ b/runtime/ftplugin/rmd.vim @@ -2,7 +2,7 @@ " Language: R Markdown file " Maintainer: Jakson Alves de Aquino " Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Sun Jul 22, 2018 06:51PM +" Last Change: Sat Aug 15, 2020 12:03PM " Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann) " Only do this when not yet done for this buffer @@ -46,7 +46,7 @@ runtime ftplugin/pandoc.vim " Don't load another plugin for this buffer let b:did_ftplugin = 1 -if has("gui_win32") && !exists("b:browsefilter") +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . \ "All Files (*.*)\t*.*\n" endif diff --git a/runtime/ftplugin/rnoweb.vim b/runtime/ftplugin/rnoweb.vim index e184399dcb..dc5f1b5e06 100644 --- a/runtime/ftplugin/rnoweb.vim +++ b/runtime/ftplugin/rnoweb.vim @@ -2,7 +2,7 @@ " Language: Rnoweb " Maintainer: Jakson Alves de Aquino " Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Tue Apr 07, 2015 04:37PM +" Last Change: Sat Aug 15, 2020 12:02PM " Only do this when not yet done for this buffer if exists("b:did_ftplugin") @@ -24,7 +24,7 @@ setlocal iskeyword=@,48-57,_,. setlocal suffixesadd=.bib,.tex setlocal comments=b:%,b:#,b:##,b:###,b:#' -if has("gui_win32") && !exists("b:browsefilter") +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . \ "All Files (*.*)\t*.*\n" endif diff --git a/runtime/ftplugin/rrst.vim b/runtime/ftplugin/rrst.vim index 3e82847d35..a56fd6478e 100644 --- a/runtime/ftplugin/rrst.vim +++ b/runtime/ftplugin/rrst.vim @@ -2,7 +2,7 @@ " Language: reStructuredText documentation format with R code " Maintainer: Jakson Alves de Aquino " Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Wed Nov 01, 2017 10:47PM +" Last Change: Sat Aug 15, 2020 12:02PM " Original work by Alex Zvoleff " Only do this when not yet done for this buffer @@ -37,7 +37,7 @@ if !exists("g:rrst_dynamic_comments") || (exists("g:rrst_dynamic_comments") && g setlocal formatexpr=FormatRrst() endif -if has("gui_win32") && !exists("b:browsefilter") +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" . \ "All Files (*.*)\t*.*\n" endif -- cgit From ad6bb386be30ee50ef2e61268597241e0ddb842b Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 2 May 2021 12:55:08 -0400 Subject: vim-patch:4c295027a426 Update runtime files https://github.com/vim/vim/commit/4c295027a426986566cd7a76c47a6d3a529727e7 --- runtime/ftplugin/fpcmake.vim | 25 +++++++++++++++++++++ runtime/ftplugin/pascal.vim | 52 ++++++++++++++++++++++++++++++++++---------- 2 files changed, 66 insertions(+), 11 deletions(-) create mode 100644 runtime/ftplugin/fpcmake.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/fpcmake.vim b/runtime/ftplugin/fpcmake.vim new file mode 100644 index 0000000000..8d950838c7 --- /dev/null +++ b/runtime/ftplugin/fpcmake.vim @@ -0,0 +1,25 @@ +" Vim filetype plugin file +" Language: Free Pascal Makefile Generator +" Maintainer: Doug Kearns +" Last Change: 2021 Apr 23 + +if exists("b:did_ftplugin") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +runtime! ftplugin/make.vim + +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Free Pascal Makefile Definition Files (*.fpc)\t*.fpc\n" .. + \ "All Files (*.*)\t*.*\n" +endif + +let b:undo_ftplugin = b:undo_ftplugin .. " | unlet! b:browsefilter" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/runtime/ftplugin/pascal.vim b/runtime/ftplugin/pascal.vim index 5ff18b9601..2de92563ae 100644 --- a/runtime/ftplugin/pascal.vim +++ b/runtime/ftplugin/pascal.vim @@ -1,20 +1,50 @@ " Vim filetype plugin file -" Language: pascal -" Maintainer: Dan Sharp -" Last Changed: 11 Apr 2011 -" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin +" Language: Pascal +" Maintainer: Doug Kearns +" Previous Maintainer: Dan Sharp +" Last Change: 2021 Apr 23 if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 +let s:cpo_save = &cpo +set cpo&vim + +set comments=s:(*,m:\ ,e:*),s:{,m:\ ,e:} +set commentstring={%s} + +if exists("pascal_delphi") + set comments+=:/// +endif + +if !exists("pascal_traditional") + set commentstring=//\ %s + set comments+=:// +endif + +setlocal formatoptions-=t formatoptions+=croql + if exists("loaded_matchit") - let b:match_ignorecase = 1 " (pascal is case-insensitive) + let b:match_ignorecase = 1 " (Pascal is case-insensitive) + + let b:match_words = '\<\%(asm\|begin\|case\|\%(\%(=\|packed\)\s*\)\@<=\%(class\|object\)\|\%(=\s*\)\@<=interface\|record\|try\)\>' + let b:match_words .= ':\%(^\s*\)\@<=\%(except\|finally\|else\|otherwise\)\>' + let b:match_words .= ':\\.\@!' + + let b:match_words .= ',\:\' + " let b:match_words .= ',\:\' " FIXME - else clashing with middle else. It seems like a debatable use anyway. + let b:match_words .= ',\:\<\%(\%(^\s*\)\@<=interface\|implementation\|initialization\|finalization\)\>:\