From 95d82fdb668b746ac100a8b7d2aca38038150707 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 29 Dec 2020 19:44:40 +0100 Subject: Update --- after/syntax/c.vim | 16 +- after/syntax/cpp.vim | 10 +- after/syntax/javascript/graphql.vim | 6 +- after/syntax/php/graphql.vim | 4 + after/syntax/reason/graphql.vim | 4 + after/syntax/typescript/graphql.vim | 4 + autoload/ledger.vim | 13 ++ autoload/terraform.vim | 19 +-- autoload/yats.vim | 2 +- extras/filetype.vim | 28 +++- ftplugin/css.vim | 5 +- ftplugin/eelixir.vim | 9 +- ftplugin/elixir.vim | 2 +- ftplugin/erlang.vim | 111 +++++++------- ftplugin/idris2.vim | 7 +- ftplugin/nroff.vim | 10 +- ftplugin/spec.vim | 36 ++--- indent/crystal.vim | 10 ++ indent/html.vim | 4 +- indent/typescript.vim | 2 +- indent/typescriptreact.vim | 42 +++--- syntax/aidl.vim | 4 +- syntax/basic/members.vim | 2 +- syntax/cabal-2.vim | 25 +++- syntax/cs.vim | 39 ++--- syntax/debchangelog.vim | 6 +- syntax/debsources.vim | 6 +- syntax/diff.vim | 6 +- syntax/eelixir.vim | 9 +- syntax/elixir.vim | 4 +- syntax/gosum.vim | 59 ++++++++ syntax/graphql.vim | 4 +- syntax/idris2.vim | 4 +- syntax/lex.vim | 2 +- syntax/pgsql.vim | 287 ++++++++++++++++++------------------ syntax/ps1.vim | 4 + syntax/python.vim | 16 +- syntax/sil.vim | 1 + syntax/smt2.vim | 29 ++-- syntax/sshdconfig.vim | 23 ++- 40 files changed, 527 insertions(+), 347 deletions(-) create mode 100644 syntax/gosum.vim diff --git a/after/syntax/c.vim b/after/syntax/c.vim index 2c2762eb..a8f7f416 100644 --- a/after/syntax/c.vim +++ b/after/syntax/c.vim @@ -6,13 +6,9 @@ endif " Vim syntax file " Language: C Additions " Original Author: Mikhail Wolfson -" http://www.vim.org/scripts/script.php?script_id=3064 -" Maintainer: bfrg +" Maintainer: bfrg " Website: https://github.com/bfrg/vim-cpp-modern -" Last Change: Oct 23, 2020 -" -" Extended C syntax highlighting including highlighting of user-defined -" functions. +" Last Change: Nov 23, 2020 " " This syntax file is based on: " https://github.com/octol/vim-cpp-enhanced-highlight @@ -63,8 +59,8 @@ hi def link cAnsiName Identifier " Highlight all standard C keywords as Statement " This is very similar to what other IDEs and editors do if get(g:, 'cpp_simple_highlight', 0) - hi link cStorageClass Statement - hi link cStructure Statement - hi link cTypedef Statement - hi link cLabel Statement + hi! def link cStorageClass Statement + hi! def link cStructure Statement + hi! def link cTypedef Statement + hi! def link cLabel Statement endif diff --git a/after/syntax/cpp.vim b/after/syntax/cpp.vim index 761a6c15..d181f261 100644 --- a/after/syntax/cpp.vim +++ b/after/syntax/cpp.vim @@ -8,7 +8,7 @@ endif " Original Author: Jon Haggblad " Maintainer: bfrg " Website: https://github.com/bfrg/vim-cpp-modern -" Last Change: Oct 8, 2020 +" Last Change: Nov 23, 2020 " " This syntax file is based on: " https://github.com/octol/vim-cpp-enhanced-highlight @@ -201,12 +201,12 @@ hi def link cppSTLvariable Identifier " The keywords {inline, virtual, explicit, export, override, final} are " standard C++ keywords and NOT types! -hi link cppModifier Statement +hi! def link cppModifier Statement " Highlight all standard C++ keywords as Statement if get(g:, 'cpp_simple_highlight', 0) - hi link cppStructure Statement - hi link cppExceptions Statement - hi link cppStorageClass Statement + hi! def link cppStructure Statement + hi! def link cppExceptions Statement + hi! def link cppStorageClass Statement endif diff --git a/after/syntax/javascript/graphql.vim b/after/syntax/javascript/graphql.vim index 3d442332..dafba802 100644 --- a/after/syntax/javascript/graphql.vim +++ b/after/syntax/javascript/graphql.vim @@ -29,7 +29,11 @@ if exists('b:current_syntax') let s:current_syntax = b:current_syntax unlet b:current_syntax endif + +let b:graphql_nested_syntax = 1 syn include @GraphQLSyntax syntax/graphql.vim +unlet b:graphql_nested_syntax + if exists('s:current_syntax') let b:current_syntax = s:current_syntax endif @@ -48,7 +52,7 @@ if graphql#has_syntax_group('jsTemplateExpression') hi def link graphqlTaggedTemplate jsTaggedTemplate hi def link graphqlTemplateExpression jsTemplateExpression - syn cluster jsExpression add=graphqlTaggedTemplate + syn cluster jsExpression add=graphqlTemplateString,graphqlTaggedTemplate syn cluster graphqlTaggedTemplate add=graphqlTemplateString elseif graphql#has_syntax_group('javaScriptStringT') " runtime/syntax/javascript.vim diff --git a/after/syntax/php/graphql.vim b/after/syntax/php/graphql.vim index d26de073..3c94bcb8 100644 --- a/after/syntax/php/graphql.vim +++ b/after/syntax/php/graphql.vim @@ -29,7 +29,11 @@ if exists('b:current_syntax') let s:current_syntax = b:current_syntax unlet b:current_syntax endif + +let b:graphql_nested_syntax = 1 syn include @GraphQLSyntax syntax/graphql.vim +unlet b:graphql_nested_syntax + if exists('s:current_syntax') let b:current_syntax = s:current_syntax endif diff --git a/after/syntax/reason/graphql.vim b/after/syntax/reason/graphql.vim index f1d8b317..0ef3b1d7 100644 --- a/after/syntax/reason/graphql.vim +++ b/after/syntax/reason/graphql.vim @@ -29,7 +29,11 @@ if exists('b:current_syntax') let s:current_syntax = b:current_syntax unlet b:current_syntax endif + +let b:graphql_nested_syntax = 1 syn include @GraphQLSyntax syntax/graphql.vim +unlet b:graphql_nested_syntax + if exists('s:current_syntax') let b:current_syntax = s:current_syntax endif diff --git a/after/syntax/typescript/graphql.vim b/after/syntax/typescript/graphql.vim index e30f0682..df6bf36c 100644 --- a/after/syntax/typescript/graphql.vim +++ b/after/syntax/typescript/graphql.vim @@ -29,7 +29,11 @@ if exists('b:current_syntax') let s:current_syntax = b:current_syntax unlet b:current_syntax endif + +let b:graphql_nested_syntax = 1 syn include @GraphQLSyntax syntax/graphql.vim +unlet b:graphql_nested_syntax + if exists('s:current_syntax') let b:current_syntax = s:current_syntax endif diff --git a/autoload/ledger.vim b/autoload/ledger.vim index 76be457d..265aa666 100644 --- a/autoload/ledger.vim +++ b/autoload/ledger.vim @@ -444,6 +444,19 @@ function! ledger#align_commodity() abort endif endf +" Align the commodity on the entire buffer +function! ledger#align_commodity_buffer() abort + " Store the viewport position + let view = winsaveview() + + " Call ledger#align_commodity for every line + %call ledger#align_commodity() + + " Restore the viewport position + call winrestview(view) + unlet view +endf + " Align the amount under the cursor and append/prepend the default currency. function! ledger#align_amount_at_cursor() abort " Select and cut text: diff --git a/autoload/terraform.vim b/autoload/terraform.vim index 652c4b30..594d74a0 100644 --- a/autoload/terraform.vim +++ b/autoload/terraform.vim @@ -48,33 +48,28 @@ endfunction function! terraform#commands(ArgLead, CmdLine, CursorPos) abort let commands = [ + \ 'init', + \ 'validate', + \ 'plan', \ 'apply', - \ 'console', \ 'destroy', - \ 'env', + \ 'console', \ 'fmt', + \ 'force-unlock', \ 'get', \ 'graph', \ 'import', - \ 'init', \ 'login', \ 'logout', \ 'output', - \ 'plan', \ 'providers', \ 'refresh', \ 'show', + \ 'state', \ 'taint', \ 'untaint', - \ 'validate', \ 'version', - \ 'workspace', - \ '0.12upgrade', - \ '0.13upgrade', - \ 'debug', - \ 'force-unlock', - \ 'push', - \ 'state' + \ 'workspace' \ ] return join(commands, "\n") endfunction diff --git a/autoload/yats.vim b/autoload/yats.vim index 8f5fe2d0..f96841aa 100644 --- a/autoload/yats.vim +++ b/autoload/yats.vim @@ -10,7 +10,7 @@ let s:syng_linecom = 'linecomment\c' " Check if the character at lnum:col is inside a multi-line comment. function yats#IsInMultilineComment(lnum, col) - return !s:IsLineComment(a:lnum, a:col) && synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_multiline + return !yats#IsLineComment(a:lnum, a:col) && synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_multiline endfunction " Check if the character at lnum:col is a line comment. diff --git a/extras/filetype.vim b/extras/filetype.vim index 4dd33f17..e3675084 100644 --- a/extras/filetype.vim +++ b/extras/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2020 Oct 24 +" Last Change: 2020 Dec 07 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -627,6 +627,9 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo " Gedcom au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom +" Gift (Moodle) +autocmd BufRead,BufNewFile *.gift setf gift + " Git au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig @@ -696,12 +699,15 @@ au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc au BufNewFile,BufRead *.haml setf haml " Hamster Classic | Playground files -au BufNewFile,BufRead *.hsc,*.hsm setf hamster +au BufNewFile,BufRead *.hsm setf hamster " Haskell -au BufNewFile,BufRead *.hs,*.hs-boot setf haskell +au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot setf haskell au BufNewFile,BufRead *.lhs setf lhaskell au BufNewFile,BufRead *.chs setf chaskell +au BufNewFile,BufRead cabal.project setf cabalproject +au BufNewFile,BufRead $HOME/.cabal/config setf cabalconfig +au BufNewFile,BufRead cabal.config setf cabalconfig " Haste au BufNewFile,BufRead *.ht setf haste @@ -1739,6 +1745,9 @@ au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf " tmux configuration au BufNewFile,BufRead {.,}tmux*.conf setf tmux +" TOML +au BufNewFile,BufRead *.toml setf toml + " TPP - Text Presentation Program au BufNewFile,BufReadPost *.tpp setf tpp @@ -1760,8 +1769,13 @@ au BufNewFile,BufReadPost *.tsscl setf tsscl " TWIG files au BufNewFile,BufReadPost *.twig setf twig -" Typescript -au BufNewFile,BufReadPost *.ts setf typescript +" Typescript or Qt translation file (which is XML) +au BufNewFile,BufReadPost *.ts + \ if getline(1) =~ ' " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2008-07-09 +" Last Change: 2020 Dec 21 if exists("b:did_ftplugin") finish @@ -16,11 +16,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/ftplugin/eelixir.vim b/ftplugin/eelixir.vim index 61a59a05..cda21c9b 100644 --- a/ftplugin/eelixir.vim +++ b/ftplugin/eelixir.vim @@ -27,7 +27,10 @@ if !exists("b:eelixir_subtype") let b:eelixir_subtype = matchstr(&filetype,'^leex\.\zs\w\+') endif if b:eelixir_subtype == '' - let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.leex\|\.eelixir\)\+$','',''),'\.\zs\w\+$') + let b:eelixir_subtype = matchstr(&filetype,'^sface\.\zs\w\+') + endif + if b:eelixir_subtype == '' + let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.sface\|\.leex\|\.eelixir\)\+$','',''),'\.\zs\w\+$') endif if b:eelixir_subtype == 'ex' let b:eelixir_subtype = 'elixir' @@ -97,6 +100,10 @@ if !exists('b:surround_35') " When using surround `#` (ASCII 35) would provide `<%# selection %>` let b:surround_35 = "<%# \r %>" endif +if !exists('b:surround_123') + " When using surround `{` (ASCII 123) would provide `{{ selection }}` + let b:surround_123 = "{{ \r }}" +endif if !exists('b:surround_5') " When using surround `` (ASCII 5 `ENQ`) would provide `<% selection %>\n<% end %>` let b:surround_5 = "<% \r %>\n<% end %>" diff --git a/ftplugin/elixir.vim b/ftplugin/elixir.vim index 2cae0e3e..9a273567 100644 --- a/ftplugin/elixir.vim +++ b/ftplugin/elixir.vim @@ -32,7 +32,7 @@ let &l:path = \ &g:path \ ], ',') setlocal includeexpr=elixir#util#get_filename(v:fname) -setlocal suffixesadd=.ex,.exs,.eex,.leex,.erl,.xrl,.yrl,.hrl +setlocal suffixesadd=.ex,.exs,.eex,.leex,.sface,.erl,.xrl,.yrl,.hrl let &l:define = 'def\(macro\|guard\|delegate\)\=p\=' diff --git a/ftplugin/erlang.vim b/ftplugin/erlang.vim index 45eb68f6..b9720484 100644 --- a/ftplugin/erlang.vim +++ b/ftplugin/erlang.vim @@ -8,90 +8,79 @@ endif " Author: Oscar Hellström " Contributors: Ricardo Catalinas Jiménez " Eduardo Lopez (http://github.com/tapichu) +" Arvid Bjurklint (http://github.com/slarwise) " License: Vim license " Version: 2012/01/25 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 +setlocal suffixesadd=.erl,.hrl - setlocal suffixesadd=.erl,.hrl +let &l:include = '^\s*-\%(include\|include_lib\)\s*("\zs\f*\ze")' +let &l:define = '^\s*-\%(define\|record\|type\|opaque\)' - let &l:include = '^\s*-\%(include\|include_lib\)\s*("\zs\f*\ze")' - let &l:define = '^\s*-\%(define\|record\|type\|opaque\)' -endfunction - -function GetErlangFold(lnum) - let lnum = a:lnum - let line = getline(lnum) - - 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< suffixesadd< include< define<" +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/ftplugin/idris2.vim b/ftplugin/idris2.vim index 28ac7b5c..9a09fada 100644 --- a/ftplugin/idris2.vim +++ b/ftplugin/idris2.vim @@ -37,8 +37,9 @@ endfunction function! s:IdrisCommand(...) let idriscmd = shellescape(join(a:000)) -" echo("idris2 " . expand ('%:p') . " --client " . idriscmd) - return system("idris2 --find-ipkg " . shellescape(expand('%:p')) . " --client " . idriscmd) + " Vim does not support ANSI escape codes natively, so we need to disable + " automatic colouring + return system("idris2 --no-color --find-ipkg " . shellescape(expand('%:p')) . " --client " . idriscmd) endfunction function! IdrisDocFold(lineNum) @@ -99,7 +100,7 @@ endfunction function! IdrisReload(q) w let file = expand('%:p') - let tc = system("idris2 --find-ipkg " . shellescape(file) . " --client ''") + let tc = system("idris2 --no-color --find-ipkg " . shellescape(file) . " --client ''") if (! (tc is "")) call IWrite(tc) else diff --git a/ftplugin/nroff.vim b/ftplugin/nroff.vim index 5ddd07f7..ac3dce4d 100644 --- a/ftplugin/nroff.vim +++ b/ftplugin/nroff.vim @@ -4,8 +4,10 @@ endif " 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 @@ -13,3 +15,7 @@ endif let b:did_ftplugin = 1 setlocal commentstring=.\\\"%s +setlocal comments=:.\\\" +setlocal sections+=Sh + +let b:undo_ftplugin = 'setlocal commentstring< comments< sections<' diff --git a/ftplugin/spec.vim b/ftplugin/spec.vim index 15234b68..fad900f9 100644 --- a/ftplugin/spec.vim +++ b/ftplugin/spec.vim @@ -77,23 +77,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) @@ -104,20 +104,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 @@ -126,16 +126,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','') @@ -175,13 +175,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 @@ -189,7 +189,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 diff --git a/indent/crystal.vim b/indent/crystal.vim index 4a0cdb00..724f9611 100644 --- a/indent/crystal.vim +++ b/indent/crystal.vim @@ -12,6 +12,16 @@ endif let b:did_indent = 1 +if !exists('g:crystal_indent_assignment_style') + " Possible values: 'variable', 'hanging' + let g:crystal_indent_assignment_style = 'hanging' +endif + +if !exists('g:crystal_indent_block_style') + " Possible values: 'expression', 'do' + let g:crystal_indent_block_style = 'expression' +endif + setlocal nosmartindent " Now, set up our indentation expression and keys that trigger it. diff --git a/indent/html.vim b/indent/html.vim index 82cd7074..25e306f3 100644 --- a/indent/html.vim +++ b/indent/html.vim @@ -5,7 +5,7 @@ endif " Vim indent script for HTML " Maintainer: Bram Moolenaar " Original Author: Andy Wokula -" Last Change: 2020 Jul 06 +" Last Change: 2020 Dec 11 " Version: 1.0 "{{{ " Description: HTML indent script with cached state for faster indenting on a " range of lines. @@ -819,7 +819,7 @@ func! s:Alien5() let idx = match(prevtext, '^\s*\zs