diff options
Diffstat (limited to 'ftplugin')
-rw-r--r-- | ftplugin/elixir.vim | 9 | ||||
-rw-r--r-- | ftplugin/git.vim | 2 | ||||
-rw-r--r-- | ftplugin/julia.vim | 2 | ||||
-rw-r--r-- | ftplugin/meson.vim | 1 | ||||
-rw-r--r-- | ftplugin/modula2.vim | 43 | ||||
-rw-r--r-- | ftplugin/modula3.vim | 42 | ||||
-rw-r--r-- | ftplugin/pascal.vim | 52 | ||||
-rw-r--r-- | ftplugin/rmd.vim | 4 | ||||
-rw-r--r-- | ftplugin/rnoweb.vim | 4 | ||||
-rw-r--r-- | ftplugin/rrst.vim | 4 | ||||
-rw-r--r-- | ftplugin/systemverilog.vim | 35 | ||||
-rw-r--r-- | ftplugin/vlang.vim | 2 |
12 files changed, 175 insertions, 25 deletions
diff --git a/ftplugin/elixir.vim b/ftplugin/elixir.vim index 4ab896db..cd25464a 100644 --- a/ftplugin/elixir.vim +++ b/ftplugin/elixir.vim @@ -25,10 +25,11 @@ setlocal commentstring=#\ %s let &l:path = \ join([ - \ 'lib', - \ 'src', - \ 'deps/**/lib', - \ 'deps/**/src', + \ 'lib/**', + \ 'src/**', + \ 'test/**', + \ 'deps/**/lib/**', + \ 'deps/**/src/**', \ &g:path \ ], ',') setlocal includeexpr=elixir#util#get_filename(v:fname) diff --git a/ftplugin/git.vim b/ftplugin/git.vim index 072859ed..9a5ac16c 100644 --- a/ftplugin/git.vim +++ b/ftplugin/git.vim @@ -37,7 +37,7 @@ if exists('*shellescape') && exists('b:git_dir') && b:git_dir != '' else setlocal keywordprg=git\ show endif -if has('gui_running') +if has('gui_running') && &guioptions !~# '!' let &l:keywordprg = substitute(&l:keywordprg,'^git\>','git --no-pager','') endif diff --git a/ftplugin/julia.vim b/ftplugin/julia.vim index 08aa2f8e..785ffa2a 100644 --- a/ftplugin/julia.vim +++ b/ftplugin/julia.vim @@ -83,7 +83,7 @@ if exists("loaded_matchit") " the 'begin' and 'end' keywords when they are used as a range rather than as " the delimiter of a block let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") =~ ' - \ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|SymbolS\\?\\|Comment[LM]\\|\\%([bsvr]\\|ip\\|MIME\\|big\\|raw\\|test\\|html\\|int128\\|Printf\\|Shell\\|Doc\\)\\?String\\|StringPrefixed\\|RegEx\\)\\>"' + \ . '"\\<julia\\%(Comprehension\\%(For\\|If\\)\\|RangeKeyword\\|Comment\\%([LM]\\|Delim\\)\\|\\%([bs]\\|Shell\\|Printf\\|Doc\\)\\?String\\|StringPrefixed\\|DocStringM\\(Raw\\)\\?\\|RegEx\\|SymbolS\\?\\|Macro\\|Dotted\\)\\>"' let b:undo_ftplugin = b:undo_ftplugin \ . " | unlet! b:match_words b:match_skip b:match_ignorecase" diff --git a/ftplugin/meson.vim b/ftplugin/meson.vim index 6074dbd3..79ff47c6 100644 --- a/ftplugin/meson.vim +++ b/ftplugin/meson.vim @@ -5,6 +5,7 @@ endif " Vim filetype plugin file " Language: meson " License: VIM License +" Maintainer: Liam Beguin <liambeguin@gmail.com> " Original Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com> " Last Change: 2018 Nov 27 diff --git a/ftplugin/modula2.vim b/ftplugin/modula2.vim new file mode 100644 index 00000000..a61d0bd1 --- /dev/null +++ b/ftplugin/modula2.vim @@ -0,0 +1,43 @@ +if polyglot#init#is_disabled(expand('<sfile>:p'), 'modula2', 'ftplugin/modula2.vim') + finish +endif + +" Vim filetype plugin file +" Language: Modula-2 +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" 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 = '\<REPEAT\>:\<UNTIL\>,' .. + \ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOOP\|WHILE\|WITH\)\>' .. + \ ':' .. + \ '\<\%(ELSIF\|ELSE\)\>\|\%(^\s*\)\@<=\w\+\%(\s*\,\s*\w\+\)\=\s*\:=\@!' .. + \ ':' .. + \ '\<END\>' +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/ftplugin/modula3.vim b/ftplugin/modula3.vim new file mode 100644 index 00000000..1e9fc10e --- /dev/null +++ b/ftplugin/modula3.vim @@ -0,0 +1,42 @@ +if polyglot#init#is_disabled(expand('<sfile>:p'), 'modula3', 'ftplugin/modula3.vim') + finish +endif + +" Vim filetype plugin file +" Language: Modula-3 +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" 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 = '\<REPEAT\>:\<UNTIL\>,' .. + \ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOCK\|LOOP\|TRY\|TYPECASE\|WHILE\|WITH\)\>' .. + \ ':' .. + \ '\<\%(ELSIF\|ELSE\|EXCEPT\|FINALLY\)\>\|\%(^\s*\)\@<=\S.*=>' .. + \ ':' .. + \ '\<END\>' +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/ftplugin/pascal.vim b/ftplugin/pascal.vim index db3da051..5b0640e7 100644 --- a/ftplugin/pascal.vim +++ b/ftplugin/pascal.vim @@ -3,22 +3,52 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'pascal', 'ftplugin/pascal.vim endif " Vim filetype plugin file -" Language: pascal -" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> -" Last Changed: 11 Apr 2011 -" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin +" Language: Pascal +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Previous Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> +" 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 .= ':\<end\>\.\@!' + + let b:match_words .= ',\<repeat\>:\<until\>' + " let b:match_words .= ',\<if\>:\<else\>' " FIXME - else clashing with middle else. It seems like a debatable use anyway. + let b:match_words .= ',\<unit\>:\<\%(\%(^\s*\)\@<=interface\|implementation\|initialization\|finalization\)\>:\<end\.' +endif - let b:match_words = '\<\%(begin\|case\|record\|object\|try\)\>' - let b:match_words .= ':\<^\s*\%(except\|finally\)\>:\<end\>' - let b:match_words .= ',\<repeat\>:\<until\>' - let b:match_words .= ',\<if\>:\<else\>' +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Pascal Source Files (*.pas *.pp *.inc)\t*.pas;*.pp;*.inc\n" . + \ "All Files (*.*)\t*.*\n" endif -" Undo the stuff we changed. -let b:undo_ftplugin = "unlet! b:match_words" +let b:undo_ftplugin = "setl fo< cms< com< " .. + \ "| unlet! b:browsefilter b:match_words b:match_ignorecase" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/ftplugin/rmd.vim b/ftplugin/rmd.vim index c2fe0c2b..c890ce5f 100644 --- a/ftplugin/rmd.vim +++ b/ftplugin/rmd.vim @@ -6,7 +6,7 @@ endif " Language: R Markdown file " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " 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 @@ -50,7 +50,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/ftplugin/rnoweb.vim b/ftplugin/rnoweb.vim index 13b68ef7..ab6389f9 100644 --- a/ftplugin/rnoweb.vim +++ b/ftplugin/rnoweb.vim @@ -6,7 +6,7 @@ endif " Language: Rnoweb " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " 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") @@ -28,7 +28,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/ftplugin/rrst.vim b/ftplugin/rrst.vim index 68661a65..25ca0dc7 100644 --- a/ftplugin/rrst.vim +++ b/ftplugin/rrst.vim @@ -6,7 +6,7 @@ endif " Language: reStructuredText documentation format with R code " Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com> " 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 @@ -41,7 +41,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 diff --git a/ftplugin/systemverilog.vim b/ftplugin/systemverilog.vim index c0959e48..53bd1351 100644 --- a/ftplugin/systemverilog.vim +++ b/ftplugin/systemverilog.vim @@ -5,7 +5,7 @@ endif " Vim filetype plugin file " Language: SystemVerilog " Maintainer: kocha <kocha.lsifrontend@gmail.com> -" Last Change: 12-Aug-2013. +" Last Change: 07-May-2021 if exists("b:did_ftplugin") finish @@ -13,3 +13,36 @@ endif " Behaves just like Verilog runtime! ftplugin/verilog.vim + +let s:cpo_save = &cpo +set cpo&vim + +" Add SystemVerilog keywords for matchit plugin. +if exists("loaded_matchit") + let b:match_words = + \ '\<begin\>:\<end\>,' . + \ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' . + \ '\<module\>:\<endmodule\>,' . + \ '\<if\>:`\@<!\<else\>,' . + \ '\<function\>:\<endfunction\>,' . + \ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' . + \ '\<task\>:\<endtask\>,' . + \ '\<specify\>:\<endspecify\>,' . + \ '\<config\>:\<endconfig\>,' . + \ '\<generate\>:\<endgenerate\>,' . + \ '\<fork\>:\<join\>\|\<join_any\>\|\<join_none\>,' . + \ '\<primitive\>:\<endprimitive\>,' . + \ '\<table\>:\<endtable\>,' . + \ '\<checker\>:\<endchecker\>,' . + \ '\<class\>:\<endclass\>,' . + \ '\<clocking\>:\<endclocking\>,' . + \ '\<gruop\>:\<endgruop\>,' . + \ '\<interface\>:\<endinterface\>,' . + \ '\<package\>:\<endpackage\>,' . + \ '\<program\>:\<endprogram\>,' . + \ '\<property\>:\<endproperty\>,' . + \ '\<sequence\>:\<endsequence\>' +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/ftplugin/vlang.vim b/ftplugin/vlang.vim index fbc0a711..2ae86f99 100644 --- a/ftplugin/vlang.vim +++ b/ftplugin/vlang.vim @@ -24,7 +24,7 @@ function! _VFormatFile() else let [_, lnum, colnum, _] = getpos('.') %delete - call append(0, split(substitution, "\n")) + call setline(1, split(substitution, "\n")) call cursor(lnum, colnum) endif endif |