diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | compiler/haml.vim | 32 | ||||
| -rw-r--r-- | compiler/ledger.vim | 8 | ||||
| -rw-r--r-- | ftplugin/haml.vim | 75 | ||||
| -rw-r--r-- | ftplugin/ocaml.vim | 3 | ||||
| -rw-r--r-- | indent/erlang.vim | 2 | ||||
| -rw-r--r-- | indent/haml.vim | 78 | ||||
| -rw-r--r-- | indent/ocaml.vim | 3 | ||||
| -rw-r--r-- | syntax/haml.vim | 113 | ||||
| -rw-r--r-- | syntax/vifm.vim | 4 | 
10 files changed, 14 insertions, 306 deletions
| @@ -89,7 +89,7 @@ If you need full functionality of any plugin, please use it directly with your p  - [go](https://github.com/fatih/vim-go) (syntax, compiler, indent)  - [gradle](https://github.com/tfnico/vim-gradle) (compiler)  - [graphql](https://github.com/jparise/vim-graphql) (syntax, indent, autoload, ftplugin, after) -- [haml](https://github.com/sheerun/vim-haml) (syntax, indent, compiler, ftplugin) +- [haml](https://github.com/sheerun/vim-haml) ()  - [handlebars](https://github.com/mustache/vim-mustache-handlebars) (syntax, indent, ftplugin)  - [haproxy](https://github.com/CH-DanReif/haproxy.vim) (syntax)  - [haskell](https://github.com/neovimhaskell/haskell-vim) (syntax, indent, ftplugin) diff --git a/compiler/haml.vim b/compiler/haml.vim deleted file mode 100644 index e942631f..00000000 --- a/compiler/haml.vim +++ /dev/null @@ -1,32 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1 - -" Vim compiler file -" Compiler:	Haml -" Maintainer:	Tim Pope <vimNOSPAM@tpope.org> -" Last Change:	2016 Aug 29 - -if exists("current_compiler") -  finish -endif -let current_compiler = "haml" - -if exists(":CompilerSet") != 2		" older Vim always used :setlocal -  command -nargs=* CompilerSet setlocal <args> -endif - -let s:cpo_save = &cpo -set cpo-=C - -CompilerSet makeprg=haml - -CompilerSet errorformat= -      \Haml\ %trror\ on\ line\ %l:\ %m, -      \Syntax\ %trror\ on\ line\ %l:\ %m, -      \%-G%.%# - -let &cpo = s:cpo_save -unlet s:cpo_save - -" vim:set sw=2 sts=2: - -endif diff --git a/compiler/ledger.vim b/compiler/ledger.vim index 7a9bc305..8d441af9 100644 --- a/compiler/ledger.vim +++ b/compiler/ledger.vim @@ -17,6 +17,10 @@ if exists(':CompilerSet') != 2    command -nargs=* CompilerSet setlocal <args>  endif +if !exists('g:ledger_main') +  let g:ledger_main = '%' +endif +  if !g:ledger_is_hledger  	" Capture Ledger errors (%-C ignores all lines between "While parsing..." and "Error:..."):  	CompilerSet errorformat=%EWhile\ parsing\ file\ \"%f\"\\,\ line\ %l:,%ZError:\ %m,%-C%.%# @@ -24,9 +28,9 @@ if !g:ledger_is_hledger  	CompilerSet errorformat+=%tarning:\ \"%f\"\\,\ line\ %l:\ %m  	" Skip all other lines:  	CompilerSet errorformat+=%-G%.%# -	exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ %\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ source\ %' +	exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . shellescape(expand(g:ledger_main)) . '\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ source\ ' . shellescape(expand(g:ledger_main))  else -	exe 'CompilerSet makeprg=('.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ %\ print\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ >\ /dev/null)' +	exe 'CompilerSet makeprg=('.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . shellescape(expand(g:ledger_main)) . '\ print\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ >\ /dev/null)'  endif  endif diff --git a/ftplugin/haml.vim b/ftplugin/haml.vim deleted file mode 100644 index ca5655ec..00000000 --- a/ftplugin/haml.vim +++ /dev/null @@ -1,75 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1 - -" Vim filetype plugin -" Language:	Haml -" Maintainer:	Tim Pope <vimNOSPAM@tpope.org> -" Last Change:	2016 Aug 29 - -" Only do this when not done yet for this buffer -if exists("b:did_ftplugin") -  finish -endif - -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 = "All Files (*.*)\t*.*\n" -let s:match_words = "" - -runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim -unlet! b:did_ftplugin -set matchpairs-=<:> - -" Override our defaults if these were set by an included ftplugin. -if exists("b:undo_ftplugin") -  let s:undo_ftplugin = b:undo_ftplugin -  unlet b:undo_ftplugin -endif -if exists("b:browsefilter") -  let s:browsefilter = b:browsefilter -  unlet b:browsefilter -endif -if exists("b:match_words") -  let s:match_words = b:match_words -  unlet b:match_words -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 -endif -if exists ("b:browsefilter") -  let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter -endif -if exists("b:match_words") -  let s:match_words = b:match_words . ',' . s:match_words -endif - -" Change the browse dialog on Win32 to show mainly Haml-related files -if has("gui_win32") -  let b:browsefilter="Haml Files (*.haml)\t*.haml\nSass Files (*.sass)\t*.sass\n" . s:browsefilter -endif - -" Load the combined list of match_words for matchit.vim -if exists("loaded_matchit") -  let b:match_words = s:match_words -endif - -setlocal comments= commentstring=-#\ %s - -let b:undo_ftplugin = "setl def< cms< com< " -      \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim:set sw=2: - -endif diff --git a/ftplugin/ocaml.vim b/ftplugin/ocaml.vim index 31694cfe..c9b88e1b 100644 --- a/ftplugin/ocaml.vim +++ b/ftplugin/ocaml.vim @@ -40,7 +40,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. diff --git a/indent/erlang.vim b/indent/erlang.vim index 165a7d7c..ad06ef5d 100644 --- a/indent/erlang.vim +++ b/indent/erlang.vim @@ -835,7 +835,7 @@ function! s:ErlangCalcIndent2(lnum, stack)          endif        elseif stack == ['prev_term_plus'] -        if token =~# '[a-zA-Z_@]' || +        if token =~# '[a-zA-Z_@#]' ||           \ token ==# '<string>' || token ==# '<string_start>' ||           \ token ==# '<quoted_atom>' || token ==# '<quoted_atom_start>'            call s:Log('    previous token found: curr_vcol + plus = ' . diff --git a/indent/haml.vim b/indent/haml.vim deleted file mode 100644 index ea6f5d17..00000000 --- a/indent/haml.vim +++ /dev/null @@ -1,78 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1 - -" Vim indent file -" Language:	Haml -" Maintainer:	Tim Pope <vimNOSPAM@tpope.org> -" Last Change:	2017 Jun 13 - -if exists("b:did_indent") -  finish -endif -runtime! indent/ruby.vim -unlet! b:did_indent -let b:did_indent = 1 - -setlocal autoindent -setlocal indentexpr=GetHamlIndent() -setlocal indentkeys=o,O,*<Return>,},],0),!^F,=end,=else,=elsif,=rescue,=ensure,=when - -" Only define the function once. -if exists("*GetHamlIndent") -  finish -endif - -let s:attributes = '\%({.\{-\}}\|\[.\{-\}\]\)' -let s:tag = '\%([%.#][[:alnum:]_-]\+\|'.s:attributes.'\)*[<>]*' - -if !exists('g:haml_self_closing_tags') -  let g:haml_self_closing_tags = 'base|link|meta|br|hr|img|input' -endif - -function! GetHamlIndent() -  let lnum = prevnonblank(v:lnum-1) -  if lnum == 0 -    return 0 -  endif -  let line = substitute(getline(lnum),'\s\+$','','') -  let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') -  let lastcol = strlen(line) -  let line = substitute(line,'^\s\+','','') -  let indent = indent(lnum) -  let cindent = indent(v:lnum) -  let sw = shiftwidth() -  if cline =~# '\v^-\s*%(elsif|else|when)>' -    let indent = cindent < indent ? cindent : indent - sw -  endif -  let increase = indent + sw -  if indent == indent(lnum) -    let indent = cindent <= indent ? -1 : increase -  endif - -  let group = synIDattr(synID(lnum,lastcol,1),'name') - -  if line =~ '^!!!' -    return indent -  elseif line =~ '^/\%(\[[^]]*\]\)\=$' -    return increase -  elseif group == 'hamlFilter' -    return increase -  elseif line =~ '^'.s:tag.'[&!]\=[=~-]\s*\%(\%(if\|else\|elsif\|unless\|case\|when\|while\|until\|for\|begin\|module\|class\|def\)\>\%(.*\<end\>\)\@!\|.*do\%(\s*|[^|]*|\)\=\s*$\)' -    return increase -  elseif line =~ '^'.s:tag.'[&!]\=[=~-].*,\s*$' -    return increase -  elseif line == '-#' -    return increase -  elseif group =~? '\v^(hamlSelfCloser)$' || line =~? '^%\v%('.g:haml_self_closing_tags.')>' -    return indent -  elseif group =~? '\v^%(hamlTag|hamlAttributesDelimiter|hamlObjectDelimiter|hamlClass|hamlId|htmlTagName|htmlSpecialTagName)$' -    return increase -  elseif synIDattr(synID(v:lnum,1,1),'name') ==? 'hamlRubyFilter' -    return GetRubyIndent() -  else -    return indent -  endif -endfunction - -" vim:set sw=2: - -endif diff --git a/indent/ocaml.vim b/indent/ocaml.vim index a38e4e95..5297b34c 100644 --- a/indent/ocaml.vim +++ b/indent/ocaml.vim @@ -32,7 +32,8 @@ setlocal nosmartindent  " Comment formatting  if !exists("no_ocaml_comments")   if (has("comments")) -   setlocal comments=sr:(*,mb:*,ex:*) +   setlocal comments=sr:(*\ ,mb:\ ,ex:*) +   setlocal comments^=sr:(**,mb:\ \ ,ex:*)     setlocal fo=cqort   endif  endif diff --git a/syntax/haml.vim b/syntax/haml.vim deleted file mode 100644 index 02f5cf83..00000000 --- a/syntax/haml.vim +++ /dev/null @@ -1,113 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1 - -" Vim syntax file -" Language:	Haml -" Maintainer:	Tim Pope <vimNOSPAM@tpope.org> -" Filenames:	*.haml -" Last Change:	2018 Aug 21 - -if exists("b:current_syntax") -  finish -endif - -if !exists("main_syntax") -  let main_syntax = 'haml' -endif -let b:ruby_no_expensive = 1 - -runtime! syntax/html.vim -unlet! b:current_syntax -silent! syn include @hamlSassTop syntax/sass.vim -unlet! b:current_syntax -syn include @hamlRubyTop syntax/ruby.vim - -syn case match - -syn region  rubyCurlyBlock   start="{" end="}" contains=@hamlRubyTop contained -syn cluster hamlRubyTop add=rubyCurlyBlock - -syn cluster hamlComponent    contains=hamlAttributes,hamlAttributesHash,hamlClassChar,hamlIdChar,hamlObject,hamlDespacer,hamlSelfCloser,hamlRuby,hamlPlainChar,hamlInterpolatable -syn cluster hamlEmbeddedRuby contains=hamlAttributesHash,hamlObject,hamlRuby,hamlRubyFilter -syn cluster hamlTop          contains=hamlBegin,hamlPlainFilter,hamlRubyFilter,hamlSassFilter,hamlComment,hamlHtmlComment - -syn match   hamlBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=hamlTag,hamlClassChar,hamlIdChar,hamlRuby,hamlPlainChar,hamlInterpolatable - -syn match   hamlTag        "%\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@hamlComponent -syn region  hamlAttributes     matchgroup=hamlAttributesDelimiter start="(" end=")" contained contains=htmlArg,hamlAttributeString,hamlAttributeVariable,htmlEvent,htmlCssDefinition nextgroup=@hamlComponent -syn region  hamlAttributesHash matchgroup=hamlAttributesDelimiter start="{" end="}" contained contains=@hamlRubyTop nextgroup=@hamlComponent -syn region  hamlObject         matchgroup=hamlObjectDelimiter     start="\[" end="\]" contained contains=@hamlRubyTop nextgroup=@hamlComponent -syn match   hamlDespacer "[<>]" contained nextgroup=hamlDespacer,hamlSelfCloser,hamlRuby,hamlPlainChar,hamlInterpolatable -syn match   hamlSelfCloser "/" contained -syn match   hamlClassChar "\." contained nextgroup=hamlClass -syn match   hamlIdChar "#{\@!" contained nextgroup=hamlId -syn match   hamlClass "\%(\w\|-\|\:\)\+" contained nextgroup=@hamlComponent -syn match   hamlId    "\%(\w\|-\)\+" contained nextgroup=@hamlComponent -syn region  hamlDocType start="^\s*!!!" end="$" - -syn region  hamlRuby   matchgroup=hamlRubyOutputChar start="[!&]\==\|\~" skip=",\s*$" end="$" contained contains=@hamlRubyTop keepend -syn region  hamlRuby   matchgroup=hamlRubyChar       start="-"           skip=",\s*$" end="$" contained contains=@hamlRubyTop keepend -syn match   hamlPlainChar "\\" contained -syn region hamlInterpolatable matchgroup=hamlInterpolatableChar start="!\===\|!=\@!" end="$" keepend contained contains=hamlInterpolation,hamlInterpolationEscape,@hamlHtmlTop -syn region hamlInterpolatable matchgroup=hamlInterpolatableChar start="&==\|&=\@!"   end="$" keepend contained contains=hamlInterpolation,hamlInterpolationEscape -syn region hamlInterpolation matchgroup=hamlInterpolationDelimiter start="#{" end="}" contains=@hamlRubyTop containedin=javascriptStringS,javascriptStringD -syn match  hamlInterpolationEscape "\\\@<!\%(\\\\\)*\\\%(\\\ze#{\|#\ze{\)" -syn region hamlErbInterpolation matchgroup=hamlInterpolationDelimiter start="<%[=-]\=" end="-\=%>" contained contains=@hamlRubyTop - -syn region  hamlAttributeString start=+\%(=\s*\)\@<='+ skip=+\%(\\\\\)*\\'+ end=+'+ contains=hamlInterpolation,hamlInterpolationEscape -syn region  hamlAttributeString start=+\%(=\s*\)\@<="+ skip=+\%(\\\\\)*\\"+ end=+"+ contains=hamlInterpolation,hamlInterpolationEscape -syn match   hamlAttributeVariable "\%(=\s*\)\@<=\%(@@\=\|\$\)\=\w\+" contained - -syn match   hamlHelper  "\<action_view?\|\<block_is_haml?\|\<is_haml?\|\.\@<!\<flatten" contained containedin=@hamlEmbeddedRuby,@hamlRubyTop -syn keyword hamlHelper   capture_haml escape_once find_and_preserve haml_concat haml_indent haml_tag html_attrs html_esape init_haml_helpers list_of non_haml precede preserve succeed surround tab_down tab_up page_class contained containedin=@hamlEmbeddedRuby,@hamlRubyTop - -syn cluster hamlHtmlTop contains=@htmlTop,htmlBold,htmlItalic,htmlUnderline -syn region  hamlPlainFilter      matchgroup=hamlFilter start="^\z(\s*\):\%(plain\|preserve\|redcloth\|textile\|markdown\|maruku\)\s*$" end="^\%(\z1 \| *$\)\@!" contains=@hamlHtmlTop,hamlInterpolation -syn region  hamlEscapedFilter    matchgroup=hamlFilter start="^\z(\s*\):\%(escaped\|cdata\)\s*$"    end="^\%(\z1 \| *$\)\@!" contains=hamlInterpolation -syn region  hamlErbFilter        matchgroup=hamlFilter start="^\z(\s*\):erb\s*$"        end="^\%(\z1 \| *$\)\@!" contains=@hamlHtmlTop,hamlErbInterpolation -syn region  hamlRubyFilter       matchgroup=hamlFilter start="^\z(\s*\):ruby\s*$"       end="^\%(\z1 \| *$\)\@!" contains=@hamlRubyTop -syn region  hamlJavascriptFilter matchgroup=hamlFilter start="^\z(\s*\):javascript\s*$" end="^\%(\z1 \| *$\)\@!" contains=@htmlJavaScript,hamlInterpolation keepend -syn region  hamlCSSFilter        matchgroup=hamlFilter start="^\z(\s*\):css\s*$"        end="^\%(\z1 \| *$\)\@!" contains=@htmlCss,hamlInterpolation keepend -syn region  hamlSassFilter       matchgroup=hamlFilter start="^\z(\s*\):sass\s*$"       end="^\%(\z1 \| *$\)\@!" contains=@hamlSassTop - -syn region  hamlJavascriptBlock start="^\z(\s*\)%script\%((type=[\"']text/javascript[\"'])\)\=\s*$" nextgroup=@hamlComponent,hamlError end="^\%(\z1 \| *$\)\@!" contains=@hamlTop,@htmlJavaScript keepend -syn region  hamlCssBlock        start="^\z(\s*\)%style" nextgroup=@hamlComponent,hamlError  end="^\%(\z1 \| *$\)\@!" contains=@hamlTop,@htmlCss keepend -syn match   hamlError "\$" contained - -syn region  hamlComment     start="^\z(\s*\)-#" end="^\%(\z1 \| *$\)\@!" contains=rubyTodo -syn region  hamlHtmlComment start="^\z(\s*\)/"  end="^\%(\z1 \| *$\)\@!" contains=@hamlTop,rubyTodo -syn match   hamlIEConditional "\%(^\s*/\)\@<=\[if\>[^]]*]" contained containedin=hamlHtmlComment - -hi def link hamlSelfCloser             Special -hi def link hamlDespacer               Special -hi def link hamlClassChar              Special -hi def link hamlIdChar                 Special -hi def link hamlTag                    Special -hi def link hamlClass                  Type -hi def link hamlId                     Identifier -hi def link hamlPlainChar              Special -hi def link hamlInterpolatableChar     hamlRubyChar -hi def link hamlRubyOutputChar         hamlRubyChar -hi def link hamlRubyChar               Special -hi def link hamlInterpolationDelimiter Delimiter -hi def link hamlInterpolationEscape    Special -hi def link hamlAttributeString        String -hi def link hamlAttributeVariable      Identifier -hi def link hamlDocType                PreProc -hi def link hamlFilter                 PreProc -hi def link hamlAttributesDelimiter    Delimiter -hi def link hamlObjectDelimiter        Delimiter -hi def link hamlHelper                 Function -hi def link hamlHtmlComment            hamlComment -hi def link hamlComment                Comment -hi def link hamlIEConditional          SpecialComment -hi def link hamlError                  Error - -let b:current_syntax = "haml" - -if main_syntax == "haml" -  unlet main_syntax -endif - -" vim:set sw=2: - -endif diff --git a/syntax/vifm.vim b/syntax/vifm.vim index 22153af7..c5eb9bf1 100644 --- a/syntax/vifm.vim +++ b/syntax/vifm.vim @@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1  " vifm syntax file  " Maintainer:  xaizek <xaizek@posteo.net> -" Last Change: May 17, 2020 +" Last Change: May 26, 2020  " Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr.  if exists('b:current_syntax') @@ -89,7 +89,7 @@ syntax case ignore  syntax keyword vifmHiGroups contained WildMenu Border Win CmdLine CurrLine  		\ OtherLine Directory Link Socket Device Executable Selected BrokenLink  		\ TopLine TopLineSel StatusLine JobLine SuggestBox Fifo ErrorMsg CmpMismatch -		\ AuxWin OtherWin TabLine TabLineSel +		\ AuxWin OtherWin TabLine TabLineSel HardLink  		\ User1 User2 User3 User4 User5 User6 User7 User8 User9  syntax keyword vifmHiStyles contained  		\ bold underline reverse inverse standout italic none | 
