parent
54f15a9e47
commit
75157d2572
|
@ -8152,7 +8152,7 @@ taglist({expr} [, {filename}]) *taglist()*
|
|||
entry depends on the language specific
|
||||
kind values. Only available when
|
||||
using a tags file generated by
|
||||
Exuberant ctags or hdrtag.
|
||||
Universal/Exuberant ctags or hdrtag.
|
||||
static A file specific tag. Refer to
|
||||
|static-tag| for more information.
|
||||
More entries may be present, depending on the content of the
|
||||
|
|
|
@ -89,9 +89,9 @@ file is opened and adds Ada related entries to the main and pop-up menu.
|
|||
*ft-ada-omni*
|
||||
|
||||
The Ada omni-completions (|i_CTRL-X_CTRL-O|) uses tags database created either
|
||||
by "gnat xref -v" or the "exuberant Ctags (http://ctags.sourceforge.net). The
|
||||
complete function will automatically detect which tool was used to create the
|
||||
tags file.
|
||||
by "gnat xref -v" or the "Universal Ctags" (https://ctags.io). The complete
|
||||
function will automatically detect which tool was used to create the tags
|
||||
file.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
3.1 Omni Completion with "gnat xref" ~
|
||||
|
@ -125,18 +125,18 @@ NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic
|
|||
3.2 Omni Completion with "ctags"~
|
||||
*ada-ctags*
|
||||
|
||||
Exuberant Ctags uses its own multi-language code parser. The parser is quite
|
||||
fast, produces a lot of extra information (hence the name "Exuberant Ctags")
|
||||
and can run on files which currently do not compile.
|
||||
Universal/Exuberant Ctags use their own multi-language code parser. The
|
||||
parser is quite fast, produces a lot of extra information and can run on files
|
||||
which currently do not compile.
|
||||
|
||||
There are also lots of other Vim-tools which use exuberant Ctags.
|
||||
There are also lots of other Vim-tools which use Universal/Exuberant Ctags.
|
||||
Universal Ctags is preferred, Exuberant Ctags is no longer being developed.
|
||||
|
||||
You will need to install a version of the Exuberant Ctags which has Ada
|
||||
support patched in. Such a version is available from the GNU Ada Project
|
||||
(http://gnuada.sourceforge.net).
|
||||
You will need to install Universal Ctags which is available from
|
||||
https://ctags.io
|
||||
|
||||
The Ada parser for Exuberant Ctags is fairly new - don't expect complete
|
||||
support yet.
|
||||
The Ada parser for Universal/Exuberant Ctags is fairly new - don't expect
|
||||
complete support yet.
|
||||
|
||||
==============================================================================
|
||||
4. Compiler Support ~
|
||||
|
|
|
@ -1342,11 +1342,16 @@ in 'runtimepath'. Thus for "java" it is autoload/javacomplete.vim.
|
|||
|
||||
C *ft-c-omni*
|
||||
|
||||
Completion of C code requires a tags file. You should use Exuberant ctags,
|
||||
because it adds extra information that is needed for completion. You can find
|
||||
it here: http://ctags.sourceforge.net/ Version 5.6 or later is recommended.
|
||||
Completion of C code requires a tags file. You should use Universal/
|
||||
Exuberant ctags, because it adds extra information that is needed for
|
||||
completion. You can find it here:
|
||||
Universal Ctags: https://ctags.io
|
||||
Exuberant Ctags: http://ctags.sourceforge.net
|
||||
|
||||
For version 5.5.4 you should add a patch that adds the "typename:" field:
|
||||
Universal Ctags is preferred, Exuberant Ctags is no longer being developed.
|
||||
|
||||
For Exuberant ctags, version 5.6 or later is recommended. For version 5.5.4
|
||||
you should add a patch that adds the "typename:" field:
|
||||
ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch
|
||||
A compiled .exe for MS-Windows can be found at:
|
||||
http://ctags.sourceforge.net/
|
||||
|
@ -1467,8 +1472,11 @@ will be suggested. All other elements are not placed in suggestion list.
|
|||
PHP *ft-php-omni*
|
||||
|
||||
Completion of PHP code requires a tags file for completion of data from
|
||||
external files and for class aware completion. You should use Exuberant ctags
|
||||
version 5.5.4 or newer. You can find it here: http://ctags.sourceforge.net/
|
||||
external files and for class aware completion. You should use Universal/
|
||||
Exuberant ctags version 5.5.4 or newer. You can find it here:
|
||||
|
||||
Universal Ctags: https://ctags.io
|
||||
Exuberant Ctags: http://ctags.sourceforge.net
|
||||
|
||||
Script completes:
|
||||
|
||||
|
|
|
@ -6333,9 +6333,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||
linear search can be avoided when case is ignored. Use a value of '2'
|
||||
in the "!_TAG_FILE_SORTED" line for this. A tag file can be case-fold
|
||||
sorted with the -f switch to "sort" in most unices, as in the command:
|
||||
"sort -f -o tags tags". For "Exuberant ctags" version 5.x or higher
|
||||
(at least 5.5) the --sort=foldcase switch can be used for this as
|
||||
well. Note that case must be folded to uppercase for this to work.
|
||||
"sort -f -o tags tags". For Universal ctags and Exuberant ctags
|
||||
version 5.x or higher (at least 5.5) the --sort=foldcase switch can be
|
||||
used for this as well. Note that case must be folded to uppercase for
|
||||
this to work.
|
||||
|
||||
By default, tag searches are case-sensitive. Case is ignored when
|
||||
'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is
|
||||
|
|
|
@ -5363,11 +5363,12 @@ WARNING: The longer the tags file, the slower this will be, and the more
|
|||
memory Vim will consume.
|
||||
|
||||
Only highlighting typedefs, unions and structs can be done too. For this you
|
||||
must use Exuberant ctags (found at http://ctags.sf.net).
|
||||
must use Universal Ctags (found at https://ctags.io) or Exuberant ctags (found
|
||||
at http://ctags.sf.net).
|
||||
|
||||
Put these lines in your Makefile:
|
||||
|
||||
# Make a highlight file for types. Requires Exuberant ctags and awk
|
||||
# Make a highlight file for types. Requires Universal/Exuberant ctags and awk
|
||||
types: types.vim
|
||||
types.vim: *.[ch]
|
||||
ctags --c-kinds=gstu -o- *.[ch] |\
|
||||
|
|
|
@ -544,7 +544,8 @@ also works. The <CR> and <NL> characters can never appear inside a line.
|
|||
|
||||
The second format is new. It includes additional information in optional
|
||||
fields at the end of each line. It is backwards compatible with Vi. It is
|
||||
only supported by new versions of ctags (such as Exuberant ctags).
|
||||
only supported by new versions of ctags (such as Universal ctags or Exuberant
|
||||
ctags).
|
||||
|
||||
{tagname} The identifier. Normally the name of a function, but it can
|
||||
be any identifier. It cannot contain a <Tab>.
|
||||
|
|
|
@ -33,10 +33,12 @@ following command: >
|
|||
ctags *.c
|
||||
|
||||
"ctags" is a separate program. Most Unix systems already have it installed.
|
||||
If you do not have it yet, you can find Exuberant ctags here:
|
||||
|
||||
If you do not have it yet, you can find Universal/Exuberant ctags at:
|
||||
http://ctags.io ~
|
||||
http://ctags.sf.net ~
|
||||
|
||||
Universal ctags is preferred, Exuberant ctags is no longer being developed.
|
||||
|
||||
Now when you are in Vim and you want to go to a function definition, you can
|
||||
jump to it by using the following command: >
|
||||
|
||||
|
@ -142,15 +144,15 @@ ONE TAGS FILE
|
|||
When Vim has to search many places for tags files, you can hear the disk
|
||||
rattling. It may get a bit slow. In that case it's better to spend this
|
||||
time while generating one big tags file. You might do this overnight.
|
||||
This requires the Exuberant ctags program, mentioned above. It offers an
|
||||
argument to search a whole directory tree: >
|
||||
This requires the Universal or Exuberant ctags program, mentioned above.
|
||||
It offers an argument to search a whole directory tree: >
|
||||
|
||||
cd ~/proj
|
||||
ctags -R .
|
||||
|
||||
The nice thing about this is that Exuberant ctags recognizes various file
|
||||
types. Thus this doesn't work just for C and C++ programs, also for Eiffel
|
||||
and even Vim scripts. See the ctags documentation to tune this.
|
||||
The nice thing about this is that Universal/Exuberant ctags recognizes various
|
||||
file types. Thus this doesn't work just for C and C++ programs, also for
|
||||
Eiffel and even Vim scripts. See the ctags documentation to tune this.
|
||||
Now you only need to tell Vim where your big tags file is: >
|
||||
|
||||
:set tags=~/proj/tags
|
||||
|
@ -232,7 +234,8 @@ A TAGS BROWSER
|
|||
Since CTRL-] takes you to the definition of the identifier under the cursor,
|
||||
you can use a list of identifier names as a table of contents. Here is an
|
||||
example.
|
||||
First create a list of identifiers (this requires Exuberant ctags): >
|
||||
First create a list of identifiers (this requires Universal or Exuberant
|
||||
ctags): >
|
||||
|
||||
ctags --c-types=f -f functions *.c
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
" Vim filetype plugin
|
||||
" Language: Liquid
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2010 May 21
|
||||
" Last Change: 2022 Mar 15
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
|
@ -53,7 +53,7 @@ if has('gui_win32')
|
|||
endif
|
||||
|
||||
if exists('loaded_matchit')
|
||||
let b:match_words .= '\<\%(if\w*\|unless\|case\)\>:\<\%(elsif\|else\|when\)\>:\<end\%(if\w*\|unless\|case\)\>,\<\%(for\|tablerow\)\>:\%({%\s*\)\@<=empty\>:\<end\%(for\|tablerow\)\>,<\(capture\|comment\|highlight\)\>:\<end\1\>'
|
||||
let b:match_words .= '\<\%(if\w*\|unless\|case\)\>:\<\%(elsif\|else\|when\)\>:\<end\%(if\w*\|unless\|case\)\>,\<\%(for\|tablerow\)\>:\%({%\s*\)\@<=empty\>:\<end\%(for\|tablerow\)\>,\<\(capture\|comment\|highlight\)\>:\<end\1\>'
|
||||
endif
|
||||
|
||||
setlocal commentstring={%\ comment\ %}%s{%\ endcomment\ %}
|
||||
|
|
|
@ -73,10 +73,11 @@ exe 'nno <buffer> <silent> ]] /' . escape(s:section, '|') . '/<CR>:nohls<CR>'
|
|||
exe 'ono <buffer> <silent> [[ ?' . escape(s:section, '|') . '?<CR>:nohls<CR>'
|
||||
exe 'ono <buffer> <silent> ]] /' . escape(s:section, '|') . '/<CR>:nohls<CR>'
|
||||
|
||||
setlocal suffixesadd=.php
|
||||
setlocal commentstring=/*%s*/
|
||||
|
||||
" Undo the stuff we changed.
|
||||
let b:undo_ftplugin = "setlocal commentstring< include< omnifunc<" .
|
||||
let b:undo_ftplugin = "setlocal suffixesadd< commentstring< include< omnifunc<" .
|
||||
\ " | unlet! b:browsefilter b:match_words | " .
|
||||
\ s:undo_ftplugin
|
||||
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
" Vim indent file
|
||||
" Language: bst
|
||||
" Author: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" $Id: bst.vim,v 1.1 2007/05/05 18:11:12 vimboss Exp $
|
||||
" Last Change: 2022 Mar 15
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal expandtab
|
||||
setlocal indentexpr=GetBstIndent(v:lnum)
|
||||
"setlocal smartindent
|
||||
setlocal cinkeys&
|
||||
setlocal cinkeys-=0#
|
||||
setlocal indentkeys&
|
||||
"setlocal indentkeys+=0%
|
||||
let b:undo_indent = 'setlocal indentexpr< cinkeys< indentkeys<'
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetBstIndent")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
" Vim indent file
|
||||
" Language: Haml
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2019 Dec 05
|
||||
" Last Change: 2022 Mar 15
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
|
@ -14,6 +14,8 @@ setlocal autoindent
|
|||
setlocal indentexpr=GetHamlIndent()
|
||||
setlocal indentkeys=o,O,*<Return>,},],0),!^F,=end,=else,=elsif,=rescue,=ensure,=when
|
||||
|
||||
let b:undo_indent = "setl ai< inde< indk<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetHamlIndent")
|
||||
finish
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
" Vim indent file
|
||||
" Language: Liquid
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2017 Jun 13
|
||||
" Last Change: 2022 Mar 15
|
||||
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
|
@ -29,17 +29,19 @@ let b:did_indent = 1
|
|||
setlocal indentexpr=GetLiquidIndent()
|
||||
setlocal indentkeys=o,O,*<Return>,<>>,{,},0),0],o,O,!^F,=end,=endif,=endunless,=endifchanged,=endcase,=endfor,=endtablerow,=endcapture,=else,=elsif,=when,=empty
|
||||
|
||||
let b:undo_indent = "setl inde< indk<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists('*GetLiquidIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
function! s:count(string,pattern)
|
||||
function! s:count(string, pattern) abort
|
||||
let string = substitute(a:string,'\C'.a:pattern,"\n",'g')
|
||||
return strlen(substitute(string,"[^\n]",'','g'))
|
||||
endfunction
|
||||
|
||||
function! GetLiquidIndent(...)
|
||||
function! GetLiquidIndent(...) abort
|
||||
if a:0 && a:1 == '.'
|
||||
let v:lnum = line('.')
|
||||
elseif a:0 && a:1 =~ '^\d'
|
||||
|
@ -51,13 +53,14 @@ function! GetLiquidIndent(...)
|
|||
let lnum = prevnonblank(v:lnum-1)
|
||||
let line = getline(lnum)
|
||||
let cline = getline(v:lnum)
|
||||
let line = substitute(line,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','')
|
||||
let line .= matchstr(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+')
|
||||
let cline = substitute(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','')
|
||||
let line = substitute(line,'\C^\%(\s*{%-\=\s*end\w*\s*-\=%}\)\+','','')
|
||||
let line = substitute(line,'\C\%(\s*{%-\=\s*if.\+-\=%}.\+{%-\=\s*endif\s*-\=%}\)\+','','g')
|
||||
let line .= matchstr(cline,'\C^\%(\s*{%-\=\s*end\w*\s*-\=%}\)\+')
|
||||
let cline = substitute(cline,'\C^\%(\s*{%-\=\s*end\w*\s*-\=%}\)\+','','')
|
||||
let sw = shiftwidth()
|
||||
let ind += sw * s:count(line,'{%\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|empty\|tablerow\|capture\)\>')
|
||||
let ind -= sw * s:count(line,'{%\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>')
|
||||
let ind -= sw * s:count(cline,'{%\s*\%(elsif\|else\|when\|empty\)\>')
|
||||
let ind -= sw * s:count(cline,'{%\s*end\w*$')
|
||||
let ind += sw * s:count(line,'{%-\=\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|empty\|tablerow\|capture\)\>')
|
||||
let ind -= sw * s:count(line,'{%-\=\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>')
|
||||
let ind -= sw * s:count(cline,'{%-\=\s*\%(elsif\|else\|when\|empty\)\>')
|
||||
let ind -= sw * s:count(cline,'{%-\=\s*end\w*$')
|
||||
return ind
|
||||
endfunction
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
" Vim indent file
|
||||
" Language: Sass
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2017 Jun 13
|
||||
" Last Change: 2022 Mar 15
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
|
@ -12,6 +12,8 @@ setlocal autoindent sw=2 et
|
|||
setlocal indentexpr=GetSassIndent()
|
||||
setlocal indentkeys=o,O,*<Return>,<:>,!^F
|
||||
|
||||
let b:undo_indent = "setl ai< inde< indk<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetSassIndent")
|
||||
finish
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
" Copyright: Vim license applies, see ":help license"
|
||||
" Last Change: 2022 Jan 17
|
||||
"
|
||||
" WORK IN PROGRESS - Only the basics work
|
||||
" Note: On MS-Windows you need a recent version of gdb. The one included with
|
||||
" MingW is too old (7.6.1).
|
||||
" I used version 7.12 from http://www.equation.com/servlet/equation.cmd?fa=gdb
|
||||
" WORK IN PROGRESS - The basics works stable, more to come
|
||||
" Note: In general you need at least GDB 7.12 because this provides the
|
||||
" frame= response in MI thread-selected events we need to sync stack to file.
|
||||
" The one included with "old" MingW is too old (7.6.1), you may upgrade it or
|
||||
" use a newer version from http://www.equation.com/servlet/equation.cmd?fa=gdb
|
||||
"
|
||||
" There are two ways to run gdb:
|
||||
" - In a terminal window; used if possible, does not work on MS-Windows
|
||||
|
@ -1026,7 +1027,7 @@ func s:Evaluate(range, arg)
|
|||
call s:SendEval(expr)
|
||||
endfunc
|
||||
|
||||
" get what is specified / under the cursor
|
||||
" get what is specified / under the cursor
|
||||
func s:GetEvaluationExpression(range, arg)
|
||||
if a:arg != ''
|
||||
" user supplied evaluation
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
" Vim syntax file
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Dec 07
|
||||
" Last Change: 2022 Mar 17
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
|
@ -245,8 +245,14 @@ syn match cWrongComTail display "\*/"
|
|||
|
||||
syn keyword cOperator sizeof
|
||||
if exists("c_gnu")
|
||||
syn keyword cType __label__ __complex__
|
||||
syn keyword cStatement __asm__
|
||||
syn keyword cOperator typeof __real__ __imag__
|
||||
syn keyword cOperator __alignof__
|
||||
syn keyword cOperator typeof __typeof__
|
||||
syn keyword cOperator __real__ __imag__
|
||||
syn keyword cStorageClass __attribute__ __const__ __extension__
|
||||
syn keyword cStorageClass inline __inline__
|
||||
syn keyword cStorageClass __restrict__ __volatile__ __noreturn__
|
||||
endif
|
||||
syn keyword cType int long short char void
|
||||
syn keyword cType signed unsigned float double
|
||||
|
@ -270,16 +276,10 @@ if !exists("c_no_c99") " ISO C99
|
|||
syn keyword cType intptr_t uintptr_t
|
||||
syn keyword cType intmax_t uintmax_t
|
||||
endif
|
||||
if exists("c_gnu")
|
||||
syn keyword cType __label__ __complex__ __volatile__
|
||||
endif
|
||||
|
||||
syn keyword cTypedef typedef
|
||||
syn keyword cStructure struct union enum
|
||||
syn keyword cStorageClass static register auto volatile extern const
|
||||
if exists("c_gnu")
|
||||
syn keyword cStorageClass inline __attribute__
|
||||
endif
|
||||
if !exists("c_no_c99") && !s:in_cpp_family
|
||||
syn keyword cStorageClass inline restrict
|
||||
endif
|
||||
|
@ -292,6 +292,7 @@ if !exists("c_no_c11")
|
|||
syn keyword cOperator _Static_assert static_assert
|
||||
syn keyword cStorageClass _Thread_local thread_local
|
||||
syn keyword cType char16_t char32_t
|
||||
syn keyword cType max_align_t
|
||||
" C11 atomics (take down the shield wall!)
|
||||
syn keyword cType atomic_bool atomic_char atomic_schar atomic_uchar
|
||||
syn keyword Ctype atomic_short atomic_ushort atomic_int atomic_uint
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
" Language: Liquid
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: *.liquid
|
||||
" Last Change: 2013 May 30
|
||||
" Last Change: 2022 Mar 15
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
|
@ -68,10 +68,10 @@ if !exists('s:subtype')
|
|||
unlet s:subtype
|
||||
endif
|
||||
|
||||
syn region liquidStatement matchgroup=liquidDelimiter start="{%" end="%}" contains=@liquidStatement containedin=ALLBUT,@liquidExempt keepend
|
||||
syn region liquidExpression matchgroup=liquidDelimiter start="{{" end="}}" contains=@liquidExpression containedin=ALLBUT,@liquidExempt keepend
|
||||
syn region liquidComment matchgroup=liquidDelimiter start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=liquidTodo,@Spell containedin=ALLBUT,@liquidExempt keepend
|
||||
syn region liquidRaw matchgroup=liquidDelimiter start="{%\s*raw\s*%}" end="{%\s*endraw\s*%}" contains=TOP,@liquidExempt containedin=ALLBUT,@liquidExempt keepend
|
||||
syn region liquidStatement matchgroup=liquidDelimiter start="{%-\=" end="-\=%}" contains=@liquidStatement containedin=ALLBUT,@liquidExempt keepend
|
||||
syn region liquidExpression matchgroup=liquidDelimiter start="{{-\=" end="-\=}}" contains=@liquidExpression containedin=ALLBUT,@liquidExempt keepend
|
||||
syn region liquidComment matchgroup=liquidDelimiter start="{%-\=\s*comment\s*-\=%}" end="{%-\=\s*endcomment\s*-\=%}" contains=liquidTodo,@Spell containedin=ALLBUT,@liquidExempt keepend
|
||||
syn region liquidRaw matchgroup=liquidDelimiter start="{%-\=\s*raw\s*-\=%}" end="{%-\=\s*endraw\s*-\=%}" contains=TOP,@liquidExempt containedin=ALLBUT,@liquidExempt keepend
|
||||
|
||||
syn cluster liquidExempt contains=liquidStatement,liquidExpression,liquidComment,liquidRaw,@liquidStatement,liquidYamlHead
|
||||
syn cluster liquidStatement contains=liquidConditional,liquidRepeat,liquidKeyword,@liquidExpression
|
||||
|
@ -79,11 +79,11 @@ syn cluster liquidExpression contains=liquidOperator,liquidString,liquidNumber,l
|
|||
|
||||
syn keyword liquidKeyword highlight nextgroup=liquidTypeHighlight skipwhite contained
|
||||
syn keyword liquidKeyword endhighlight contained
|
||||
syn region liquidHighlight start="{%\s*highlight\s\+\w\+\s*%}" end="{% endhighlight %}" keepend
|
||||
syn region liquidHighlight start="{%-\=\s*highlight\s\+\w\+\s*-\=%}" end="{%-\= endhighlight -\=%}" keepend
|
||||
|
||||
for s:type in g:liquid_highlight_types
|
||||
exe 'syn match liquidTypeHighlight "\<'.matchstr(s:type,'[^=]*').'\>" contained'
|
||||
exe 'syn region liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' start="{%\s*highlight\s\+'.matchstr(s:type,'[^=]*').'\s*%}" end="{% endhighlight %}" keepend contains=@liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g')
|
||||
exe 'syn region liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' start="{%-\=\s*highlight\s\+'.matchstr(s:type,'[^=]*').'\s*-\=%}" end="{%-\= endhighlight -\=%}" keepend contains=@liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g')
|
||||
endfor
|
||||
unlet! s:type
|
||||
|
||||
|
@ -92,18 +92,18 @@ syn region liquidString matchgroup=liquidQuote start=+'+ end=+'+ contained
|
|||
syn match liquidNumber "-\=\<\d\+\>" contained
|
||||
syn match liquidFloat "-\=\<\d\+\>\.\.\@!\%(\d\+\>\)\=" contained
|
||||
syn keyword liquidBoolean true false contained
|
||||
syn keyword liquidNull null nil contained
|
||||
syn keyword liquidNull null nil blank contained
|
||||
syn match liquidEmpty "\<empty\>" contained
|
||||
|
||||
syn keyword liquidOperator and or not contained
|
||||
syn match liquidPipe '|' contained skipwhite nextgroup=liquidFilter
|
||||
|
||||
syn keyword liquidFilter date capitalize downcase upcase first last join sort size strip_html strip_newlines newline_to_br replace replace_first remove remove_first truncate truncatewords prepend append minus plus times divided_by contained
|
||||
syn keyword liquidFilter date capitalize downcase upcase escape escape_once first last join sort size where uniq strip_html strip_newlines newline_to_br replace replace_first remove remove_first slice split strip truncate truncatewords prepend append url_encode url_decode abs at_most at_least ceil divided_by floor minus plus round times modulo contained
|
||||
|
||||
syn keyword liquidConditional if elsif else endif unless endunless case when endcase ifchanged endifchanged contained
|
||||
syn keyword liquidRepeat for endfor tablerow endtablerow in contained
|
||||
syn match liquidRepeat "\%({%\s*\)\@<=empty\>" contained
|
||||
syn keyword liquidKeyword assign cycle include with contained
|
||||
syn keyword liquidRepeat for endfor tablerow endtablerow in break continue limit offset reversed contained
|
||||
syn match liquidRepeat "\%({%-\=\s*\)\@<=empty\>" contained
|
||||
syn keyword liquidKeyword assign capture endcapture increasement decreasement cycle include with render contained
|
||||
|
||||
syn keyword liquidForloop forloop nextgroup=liquidForloopDot contained
|
||||
syn match liquidForloopDot "\." nextgroup=liquidForloopAttribute contained
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
" Language: Sass
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: *.sass
|
||||
" Last Change: 2019 Dec 05
|
||||
" Last Change: 2022 Mar 15
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
|
@ -58,6 +58,7 @@ syn match sassAmpersand "&"
|
|||
" TODO: Arithmetic (including strings and concatenation)
|
||||
|
||||
syn region sassMediaQuery matchgroup=sassMedia start="@media" end="[{};]\@=\|$" contains=sassMediaOperators
|
||||
syn region sassKeyframe matchgroup=cssAtKeyword start=/@\(-[a-z]\+-\)\=keyframes\>/ end=";\|$" contains=cssVendor,cssComment nextgroup=cssDefinition
|
||||
syn keyword sassMediaOperators and not only contained
|
||||
syn region sassCharset start="@charset" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType
|
||||
syn region sassInclude start="@import" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType
|
||||
|
|
Loading…
Reference in New Issue