diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-01 08:33:15 +0200 | 
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-01 08:33:15 +0200 | 
| commit | e166f741ef054ea990aa6d1af85b97ceb82171bb (patch) | |
| tree | 275e4f7660eaa181cc3e40f71ce72ba8864e6c71 /ftplugin | |
| parent | d4fcef1aa835f20f4f9df41eceb406b66f446f70 (diff) | |
| download | vim-polyglot-e166f741ef054ea990aa6d1af85b97ceb82171bb.tar.gz vim-polyglot-e166f741ef054ea990aa6d1af85b97ceb82171bb.zip | |
Some major updates including heuristicsv4.6.0
- Allow to define heuristics in heuristics.yaml
- Migrate all filetypes from vim beginning with "a"
- Remove enhanced cpp syntax (it was too slow to load)
- Use setf instead of set ft for setting filetype (faster)
- Override native hauristics with au!
- Add globbing of files for packages
- Replace predefined dirs with extra_dirs and ignored_dirs
- Allow to define proper order of packages with topological sort
- Fix powershell detection
- Lint and fix many packages.yaml issues
- etc etd
Diffstat (limited to 'ftplugin')
| -rw-r--r-- | ftplugin/8th.vim | 29 | ||||
| -rw-r--r-- | ftplugin/a2ps.vim | 24 | ||||
| -rw-r--r-- | ftplugin/aap.vim | 29 | ||||
| -rw-r--r-- | ftplugin/abap.vim | 33 | ||||
| -rw-r--r-- | ftplugin/abaqus.vim | 101 | ||||
| -rw-r--r-- | ftplugin/ada.vim | 214 | ||||
| -rw-r--r-- | ftplugin/alsaconf.vim | 23 | ||||
| -rw-r--r-- | ftplugin/ant.vim | 48 | ||||
| -rw-r--r-- | ftplugin/arch.vim | 23 | ||||
| -rw-r--r-- | ftplugin/art.vim | 19 | ||||
| -rw-r--r-- | ftplugin/automake.vim | 20 | ||||
| -rw-r--r-- | ftplugin/awk.vim | 22 | ||||
| -rw-r--r-- | ftplugin/crystal.vim | 3 | ||||
| -rw-r--r-- | ftplugin/grub.vim | 23 | ||||
| -rw-r--r-- | ftplugin/help.vim | 26 | ||||
| -rw-r--r-- | ftplugin/m4.vim | 24 | ||||
| -rw-r--r-- | ftplugin/zig.vim | 26 | 
17 files changed, 678 insertions, 9 deletions
| diff --git a/ftplugin/8th.vim b/ftplugin/8th.vim new file mode 100644 index 00000000..29c08c5e --- /dev/null +++ b/ftplugin/8th.vim @@ -0,0 +1,29 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '8th') == -1 + +" Vim ftplugin file +" Language:	8th +" Version:	any +" Last Change:	2015/11/08 +" Maintainer:	Ron Aaron <ron@aaron-tech.com> +" URL:          https://8th-dev.com/ +" Filetypes:	*.8th +" NOTE: 	8th allows any non-whitespace in a name, so you need to do: +" 		setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 +" 		This goes with the syntax/8th.vim file. + +" Only do this when not done yet for this buffer +if exists("b:did_8thplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_8thplugin = 1 + +setlocal ts=2 sts=2 sw=2 et +setlocal com=s1:/*,mb:*,ex:*/,:\|,:\\ +setlocal fo=tcrqol +setlocal matchpairs+=\::; +setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 +setlocal suffixesadd=.8th + +endif diff --git a/ftplugin/a2ps.vim b/ftplugin/a2ps.vim new file mode 100644 index 00000000..1274e83a --- /dev/null +++ b/ftplugin/a2ps.vim @@ -0,0 +1,24 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'a2ps') == -1 + +" Vim filetype plugin file +" Language:             a2ps(1) configuration file +" Previous Maintainer:  Nikolai Weibull <now@bitwi.se> +" Latest Revision:      2008-07-09 + +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< inc< fo<" + +setlocal comments=:# commentstring=#\ %s include=^\\s*Include: +setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/aap.vim b/ftplugin/aap.vim new file mode 100644 index 00000000..d163c5bb --- /dev/null +++ b/ftplugin/aap.vim @@ -0,0 +1,29 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aap') == -1 + +" Vim filetype plugin file +" Language:	Aap recipe +" Maintainer:	Bram Moolenaar <Bram@vim.org> +" Last Change:	2013 Apr 05 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") +  finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Reset 'formatoptions', 'comments' and 'expandtab' to undo this plugin. +let b:undo_ftplugin = "setl fo< com< et<" + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting <CR> or using "o". +setlocal fo-=t fo+=croql + +" Set 'comments' to format dashed lists in comments. +setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:- + +" Expand tabs to spaces to avoid trouble. +setlocal expandtab + +endif diff --git a/ftplugin/abap.vim b/ftplugin/abap.vim new file mode 100644 index 00000000..1c1631c0 --- /dev/null +++ b/ftplugin/abap.vim @@ -0,0 +1,33 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abap') == -1 + +" Vim filetype plugin file +" Language:	ABAP +" Author:	Steven Oliver <oliver.steven@gmail.com> +" Copyright:	Copyright (c) 2013 Steven Oliver +" License:	You may redistribute this under the same terms as Vim itself +" -------------------------------------------------------------------------- + +" Only do this when not done yet for this buffer +if (exists("b:did_ftplugin")) +  finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal softtabstop=2 shiftwidth=2 +setlocal suffixesadd=.abap + +" Windows allows you to filter the open file dialog +if has("gui_win32") && !exists("b:browsefilter") +  let b:browsefilter = "ABAP Source Files (*.abap)\t*.abap\n" . +                     \ "All Files (*.*)\t*.*\n" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: set sw=4 sts=4 et tw=80 : + +endif diff --git a/ftplugin/abaqus.vim b/ftplugin/abaqus.vim new file mode 100644 index 00000000..efa42dda --- /dev/null +++ b/ftplugin/abaqus.vim @@ -0,0 +1,101 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abaqus') == -1 + +" Vim filetype plugin file +" Language:     Abaqus finite element input file (www.abaqus.com) +" Maintainer:   Carl Osterwisch <osterwischc@asme.org> +" Last Change:  2012 Apr 30 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") | finish | endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Save the compatibility options and temporarily switch to vim defaults +let s:cpo_save = &cpoptions +set cpoptions&vim + +" Set the format of the include file specification for Abaqus +" Used in :check gf ^wf [i and other commands +setlocal include=\\<\\cINPUT\\s*= + +" Remove characters up to the first = when evaluating filenames +setlocal includeexpr=substitute(v:fname,'.\\{-}=','','') + +" Remove comma from valid filename characters since it is used to +" separate keyword parameters +setlocal isfname-=, + +" Define format of comment lines (see 'formatoptions' for uses) +setlocal comments=:** +setlocal commentstring=**%s + +" Definitions start with a * and assign a NAME, NSET, or ELSET +" Used in [d ^wd and other commands +setlocal define=^\\*\\a.*\\c\\(NAME\\\|NSET\\\|ELSET\\)\\s*= + +" Abaqus keywords and identifiers may include a - character +setlocal iskeyword+=- + +let b:undo_ftplugin = "setlocal include< includeexpr< isfname<" +    \ . " comments< commentstring< define< iskeyword<" + +if has("folding") +    " Fold all lines that do not begin with * +    setlocal foldexpr=getline(v:lnum)[0]!=\"\*\" +    setlocal foldmethod=expr +    let b:undo_ftplugin .= " foldexpr< foldmethod<" +endif + +" Set the file browse filter (currently only supported under Win32 gui) +if has("gui_win32") && !exists("b:browsefilter") +    let b:browsefilter = "Abaqus Input Files (*.inp *.inc)\t*.inp;*.inc\n" . +    \ "Abaqus Results (*.dat)\t*.dat\n" . +    \ "Abaqus Messages (*.pre *.msg *.sta)\t*.pre;*.msg;*.sta\n" . +    \ "All Files (*.*)\t*.*\n" +    let b:undo_ftplugin .= "|unlet! b:browsefilter" +endif + +" Define patterns for the matchit plugin +if exists("loaded_matchit") && !exists("b:match_words") +    let b:match_ignorecase = 1 +    let b:match_words =  +    \ '\*part:\*end\s*part,' . +    \ '\*assembly:\*end\s*assembly,' . +    \ '\*instance:\*end\s*instance,' . +    \ '\*step:\*end\s*step' +    let b:undo_ftplugin .= "|unlet! b:match_ignorecase b:match_words" +endif + +" Define keys used to move [count] keywords backward or forward. +noremap <silent><buffer> [[ ?^\*\a<CR>:nohlsearch<CR> +noremap <silent><buffer> ]] /^\*\a<CR>:nohlsearch<CR> + +" Define key to toggle commenting of the current line or range +noremap <silent><buffer> <LocalLeader><LocalLeader>  +    \ :call <SID>Abaqus_ToggleComment()<CR>j +function! <SID>Abaqus_ToggleComment() range +    if strpart(getline(a:firstline), 0, 2) == "**" +        " Un-comment all lines in range +        silent execute a:firstline . ',' . a:lastline . 's/^\*\*//' +    else +        " Comment all lines in range +        silent execute a:firstline . ',' . a:lastline . 's/^/**/' +    endif +endfunction + +let b:undo_ftplugin .= "|unmap <buffer> [[|unmap <buffer> ]]" +    \ . "|unmap <buffer> <LocalLeader><LocalLeader>" + +" Undo must be done in nocompatible mode for <LocalLeader>. +let b:undo_ftplugin = "let s:cpo_save = &cpoptions|" +    \ . "set cpoptions&vim|" +    \ . b:undo_ftplugin +    \ . "|let &cpoptions = s:cpo_save" +    \ . "|unlet s:cpo_save" + +" Restore saved compatibility options +let &cpoptions = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/ada.vim b/ftplugin/ada.vim new file mode 100644 index 00000000..59bde0a5 --- /dev/null +++ b/ftplugin/ada.vim @@ -0,0 +1,214 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1 + +"------------------------------------------------------------------------------ +"  Description: Perform Ada specific completion & tagging. +"     Language: Ada (2005) +"	   $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $ +"   Maintainer: Martin Krischik <krischik@users.sourceforge.net> +"		Taylor Venable <taylor@metasyntax.net> +"		Neil Bird <neil@fnxweb.com> +"      $Author: krischik $ +"	 $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +"      Version: 4.6 with patch from David Bürgin +"    $Revision: 887 $ +"     $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/ftplugin/ada.vim $ +"      History: 24.05.2006 MK Unified Headers +"		26.05.2006 MK ' should not be in iskeyword. +"		16.07.2006 MK Ada-Mode as vim-ball +"		02.10.2006 MK Better folding. +"		15.10.2006 MK Bram's suggestion for runtime integration +"               05.11.2006 MK Bram suggested not to use include protection for +"                             autoload +"		05.11.2006 MK Bram suggested to save on spaces +"		08.07.2007 TV fix default compiler problems. +"    Help Page: ft-ada-plugin +"------------------------------------------------------------------------------ +" Provides mapping overrides for tag jumping that figure out the current +" Ada object and tag jump to that, not the 'simple' vim word. +" Similarly allows <Ctrl-N> matching of full-length ada entities from tags. +"------------------------------------------------------------------------------ + +" Only do this when not done yet for this buffer +if exists ("b:did_ftplugin") || version < 700 +   finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 45 + +" +" Temporarily set cpoptions to ensure the script loads OK +" +let s:cpoptions = &cpoptions +set cpoptions-=C + +" Section: Comments  {{{1 +" +setlocal comments=O:--,:--\ \  +setlocal commentstring=--\ \ %s +setlocal complete=.,w,b,u,t,i + +" Section: case	     {{{1 +" +setlocal nosmartcase +setlocal ignorecase + +" Section: formatoptions {{{1 +" +setlocal formatoptions+=ron + +" Section: Tagging {{{1 +" +if exists ("g:ada_extended_tagging") +   " Make local tag mappings for this buffer (if not already set) +   if g:ada_extended_tagging == 'jump' +      if mapcheck('<C-]>','n') == '' +	 nnoremap <unique> <buffer> <C-]>    :call ada#Jump_Tag ('', 'tjump')<cr> +      endif +      if mapcheck('g<C-]>','n') == '' +	 nnoremap <unique> <buffer> g<C-]>   :call ada#Jump_Tag ('','stjump')<cr> +      endif +   elseif g:ada_extended_tagging == 'list' +      if mapcheck('<C-]>','n') == '' +	 nnoremap <unique> <buffer> <C-]>    :call ada#List_Tag ()<cr> +      endif +      if mapcheck('g<C-]>','n') == '' +	 nnoremap <unique> <buffer> g<C-]>   :call ada#List_Tag ()<cr> +      endif +   endif +endif + +" Section: Completion {{{1 +" +setlocal completefunc=ada#User_Complete +setlocal omnifunc=adacomplete#Complete + +if exists ("g:ada_extended_completion") +   if mapcheck ('<C-N>','i') == '' +      inoremap <unique> <buffer> <C-N> <C-R>=ada#Completion("\<lt>C-N>")<cr> +   endif +   if mapcheck ('<C-P>','i') == '' +      inoremap <unique> <buffer> <C-P> <C-R>=ada#Completion("\<lt>C-P>")<cr> +   endif +   if mapcheck ('<C-X><C-]>','i') == '' +      inoremap <unique> <buffer> <C-X><C-]> <C-R>=<SID>ada#Completion("\<lt>C-X>\<lt>C-]>")<cr> +   endif +   if mapcheck ('<bs>','i') == '' +      inoremap <silent> <unique> <buffer> <bs> <C-R>=ada#Insert_Backspace ()<cr> +   endif +endif + +" Section: Matchit {{{1 +" +" Only do this when not done yet for this buffer & matchit is used +" +if !exists ("b:match_words")  && +  \ exists ("loaded_matchit") +   " +   " The following lines enable the macros/matchit.vim plugin for +   " Ada-specific extended matching with the % key. +   " +   let s:notend      = '\%(\<end\s\+\)\@<!' +   let b:match_words = +      \ s:notend . '\<if\>:\<elsif\>:\<else\>:\<end\>\s\+\<if\>,' . +      \ s:notend . '\<case\>:\<when\>:\<end\>\s\+\<case\>,' . +      \ '\%(\<while\>.*\|\<for\>.*\|'.s:notend.'\)\<loop\>:\<end\>\s\+\<loop\>,' . +      \ '\%(\<do\>\|\<begin\>\):\<exception\>:\<end\>\s*\%($\|[;A-Z]\),' . +      \ s:notend . '\<record\>:\<end\>\s\+\<record\>' +endif + + +" Section: Compiler {{{1 +" +if ! exists("g:ada_default_compiler") +   if has("vms") +      let g:ada_default_compiler = 'decada' +   else +      let g:ada_default_compiler = 'gnat' +   endif +endif + +if ! exists("current_compiler")			|| +   \ current_compiler != g:ada_default_compiler +   execute "compiler " . g:ada_default_compiler +endif + +" Section: Folding {{{1 +" +if exists("g:ada_folding") +   if g:ada_folding[0] == 'i' +      setlocal foldmethod=indent +      setlocal foldignore=-- +      setlocal foldnestmax=5 +   elseif g:ada_folding[0] == 'g' +      setlocal foldmethod=expr +      setlocal foldexpr=ada#Pretty_Print_Folding(v:lnum) +   elseif g:ada_folding[0] == 's' +      setlocal foldmethod=syntax +   endif +   setlocal tabstop=8 +   setlocal softtabstop=3 +   setlocal shiftwidth=3 +endif + +" Section: Abbrev {{{1 +" +if exists("g:ada_abbrev") +   iabbrev ret	return +   iabbrev proc procedure +   iabbrev pack package +   iabbrev func function +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'')') + +" 1}}} +" Reset cpoptions +let &cpoptions = s:cpoptions +unlet s:cpoptions + +finish " 1}}} + +"------------------------------------------------------------------------------ +"   Copyright (C) 2006	Martin Krischik +" +"   Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: textwidth=78 nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: foldmethod=marker + +endif diff --git a/ftplugin/alsaconf.vim b/ftplugin/alsaconf.vim new file mode 100644 index 00000000..68ce4a30 --- /dev/null +++ b/ftplugin/alsaconf.vim @@ -0,0 +1,23 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'alsaconf') == -1 + +" Vim filetype plugin file +" Language:             alsaconf(8) configuration file +" Previous Maintainer:  Nikolai Weibull <now@bitwi.se> +" Latest Revision:      2008-07-09 + +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<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/ant.vim b/ftplugin/ant.vim new file mode 100644 index 00000000..565815bd --- /dev/null +++ b/ftplugin/ant.vim @@ -0,0 +1,48 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 + +" Vim filetype plugin file +" Language:	ant +" Maintainer:	Dan Sharp <dwsharp at users dot sourceforge dot net> +" Last Changed: 20 Jan 2009 +" URL:		http://dwsharp.users.sourceforge.net/vim/ftplugin + +if exists("b:did_ftplugin") | finish | endif + +" Make sure the continuation lines below do not cause problems in +" compatibility mode. +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "XML Files (*.xml)\t*.xml\n" . +	    \	     "All Files (*.*)\t*.*\n" + +runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim +let b:did_ftplugin = 1 + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") +    let s:undo_ftplugin = b:undo_ftplugin +endif +if exists("b:browsefilter") +    let s:browsefilter = b:browsefilter +endif + +" Change the :browse e filter to primarily show Ant-related files. +if has("gui_win32") +    let b:browsefilter = "Build Files (build.xml)\tbuild.xml\n" . +		\	 "Java Files (*.java)\t*.java\n" . +		\	 "Properties Files (*.prop*)\t*.prop*\n" . +		\	 "Manifest Files (*.mf)\t*.mf\n" . +		\	 s:browsefilter +endif + +" Undo the stuff we changed. +let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin + +" Restore the saved compatibility options. +let &cpo = s:save_cpo +unlet s:save_cpo + +endif diff --git a/ftplugin/arch.vim b/ftplugin/arch.vim new file mode 100644 index 00000000..c9e018bc --- /dev/null +++ b/ftplugin/arch.vim @@ -0,0 +1,23 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arch') == -1 + +" Vim filetype plugin file +" Language:             GNU Arch inventory file +" Previous Maintainer:  Nikolai Weibull <now@bitwi.se> +" Latest Revision:      2008-07-09 + +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<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/art.vim b/ftplugin/art.vim new file mode 100644 index 00000000..ce63ba52 --- /dev/null +++ b/ftplugin/art.vim @@ -0,0 +1,19 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'art') == -1 + +" Vim filetype plugin +" Language:      ART-IM and ART*Enterprise +" Maintainer:    Dorai Sitaram <ds26@gte.com> +" URL:		 http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html +" Last Change:   Apr 2, 2003 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") +  finish +endif + +run ftplugin/lisp.vim + +setl lw-=if +setl lw+=def-art-fun,deffacts,defglobal,defrule,defschema,for,schema,while + +endif diff --git a/ftplugin/automake.vim b/ftplugin/automake.vim new file mode 100644 index 00000000..0e853843 --- /dev/null +++ b/ftplugin/automake.vim @@ -0,0 +1,20 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'automake') == -1 + +" Vim filetype plugin file +" Language:             Automake +" Previous Maintainer:  Nikolai Weibull <now@bitwi.se> +" Latest Revision:      2008-07-09 + +if exists("b:did_ftplugin") +  finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +runtime! ftplugin/make.vim ftplugin/make_*.vim ftplugin/make/*.vim + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/awk.vim b/ftplugin/awk.vim new file mode 100644 index 00000000..fbccec1c --- /dev/null +++ b/ftplugin/awk.vim @@ -0,0 +1,22 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'awk') == -1 + +" Vim filetype plugin +" Language:	awk, nawk, gawk, mawk +" Maintainer:	Antonio Colombo <azc100@gmail.com> +" Last Change:	2017 Feb 17 + +" This plugin was prepared by Mark Sikora + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") +  finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl commentstring<" + +setlocal commentstring=#\ %s + +endif diff --git a/ftplugin/crystal.vim b/ftplugin/crystal.vim index c74901f0..0a206003 100644 --- a/ftplugin/crystal.vim +++ b/ftplugin/crystal.vim @@ -37,8 +37,9 @@ nnoremap <buffer><Plug>(crystal-spec-run-all)       :<C-u>CrystalSpecRunAll<CR>  nnoremap <buffer><Plug>(crystal-spec-run-current)   :<C-u>CrystalSpecRunCurrent<CR>  nnoremap <buffer><Plug>(crystal-format)             :<C-u>CrystalFormat<CR> +" autocmd is setup per buffer. Please do not use :autocmd!. It refreshes +" augroup hence removes autocmds for other buffers (#105)  augroup plugin-ft-crystal -  autocmd!    autocmd BufWritePre <buffer> if g:crystal_auto_format && &filetype ==# 'crystal' | call crystal_lang#format('', 1) | endif  augroup END diff --git a/ftplugin/grub.vim b/ftplugin/grub.vim new file mode 100644 index 00000000..03df3729 --- /dev/null +++ b/ftplugin/grub.vim @@ -0,0 +1,23 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'grub') == -1 + +" Vim filetype plugin file +" Language:             grub(8) configuration file +" Previous Maintainer:  Nikolai Weibull <now@bitwi.se> +" Latest Revision:      2008-07-09 + +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<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/help.vim b/ftplugin/help.vim new file mode 100644 index 00000000..5e9a4aa0 --- /dev/null +++ b/ftplugin/help.vim @@ -0,0 +1,26 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'help') == -1 + +" Vim filetype plugin file +" Language:             Vim help file +" Previous Maintainer:  Nikolai Weibull <now@bitwi.se> +" Latest Revision:      2018-12-29 + +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 fo< tw< cole< cocu< keywordprg<" + +setlocal formatoptions+=tcroql textwidth=78 keywordprg=:help +if has("conceal") +  setlocal cole=2 cocu=nc +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/m4.vim b/ftplugin/m4.vim new file mode 100644 index 00000000..16479d43 --- /dev/null +++ b/ftplugin/m4.vim @@ -0,0 +1,24 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'm4') == -1 + +" Vim filetype plugin file +" Language:             m4 +" Previous Maintainer:  Nikolai Weibull <now@bitwi.se> +" Latest Revision:      2008-07-09 + +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<" + +setlocal comments=:#,:dnl commentstring=dnl\ %s +setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/zig.vim b/ftplugin/zig.vim index 663ec875..1675d20c 100644 --- a/ftplugin/zig.vim +++ b/ftplugin/zig.vim @@ -1,24 +1,34 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1  " Only do this when not done yet for this buffer -if (exists("b:did_ftplugin")) +if exists("b:did_ftplugin")    finish  endif  let b:did_ftplugin = 1 +let s:cpo_orig = &cpo +set cpo&vim + +" Recomended code style, no tabs and 4-space indentation  setlocal expandtab -setlocal tabstop=4 +setlocal tabstop=8 +setlocal softtabstop=4  setlocal shiftwidth=4 -setlocal suffixesadd=.zig -setlocal suffixesadd=.zir -setlocal commentstring=//\ %s +setlocal formatoptions-=t formatoptions+=croql + +setlocal suffixesadd=.zig,.zir  setlocal makeprg=zig\ build -if (has("comments")) -    set comments=:///,://,:\\\\ -    set formatoptions=tcqor +if has("comments") +    setlocal comments=:///,://!,://,:\\\\ +    setlocal commentstring=//\ %s  endif +let b:undo_ftplugin = "setl et< ts< sts< sw< fo< sua< mp< com< cms<" + +let &cpo = s:cpo_orig +unlet s:cpo_orig +  endif | 
