neosnippet.vim/syntax/neosnippet.vim

91 lines
3.5 KiB
VimL
Raw Normal View History

2012-02-02 04:33:35 +00:00
"=============================================================================
2013-04-11 01:46:19 +00:00
" FILE: syntaxtax/snippet.vim
2017-06-15 00:11:15 +00:00
" AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com>
" License: MIT license
2012-02-02 04:33:35 +00:00
"=============================================================================
if version < 700
syntax clear
2013-04-12 08:13:38 +00:00
elseif exists("b:current_syntax")
2012-02-02 04:33:35 +00:00
finish
endif
2013-04-11 01:46:19 +00:00
syntax region neosnippetString
\ start=+'+ end=+'+ contained
syntax region neosnippetString
\ start=+"+ end=+"+ contained
syntax region neosnippetEval
\ start=+\\\@<!`+ end=+\\\@<!`+ contained
syntax match neosnippetWord
2013-04-12 07:22:36 +00:00
\ '^\s\+.*$' contains=
2012-10-29 10:27:18 +00:00
\neosnippetEval,neosnippetPlaceHolder,neosnippetEscape,neosnippetVariable
2013-04-11 01:46:19 +00:00
syntax match neosnippetPlaceHolder
2017-04-01 01:23:58 +00:00
\ '\%(\\\@<!\|\\\\\zs\)\${\d\+\%(:.\{-}\)\?\\\@<!}'
2012-10-29 10:27:18 +00:00
\ contained contains=neosnippetPlaceHolderComment
2013-04-11 01:46:19 +00:00
syntax match neosnippetVariable
2013-04-12 07:22:36 +00:00
\ '\\\@<!\$\d\+' contained
2013-04-11 01:46:19 +00:00
syntax match neosnippetComment
2013-04-12 07:22:36 +00:00
\ '^#.*$'
2013-04-11 01:46:19 +00:00
syntax match neosnippetEscape
2013-04-12 07:22:36 +00:00
\ '\\[`]' contained
2012-02-02 04:33:35 +00:00
2013-04-11 01:46:19 +00:00
syntax match neosnippetKeyword
2015-12-23 12:05:12 +00:00
\ '^\%(include\|source\|snippet\|abbr\|prev_word\|delete\|alias\|options\|regexp\|TARGET\)' contained
2013-04-11 01:46:19 +00:00
syntax keyword neosnippetOption
\ head word indent contained
syntax match neosnippetPrevWords
2013-04-12 07:22:36 +00:00
\ '^prev_word\s\+.*$' contains=neosnippetString,neosnippetKeyword
2013-04-11 01:46:19 +00:00
syntax match neosnippetRegexpr
2013-04-12 07:22:36 +00:00
\ '^regexp\s\+.*$' contains=neosnippetString,neosnippetKeyword
2013-04-11 01:46:19 +00:00
syntax match neosnippetStatementName
2013-04-12 07:22:36 +00:00
\ '^snippet\s.*$' contains=neosnippetName,neosnippetKeyword
2013-04-11 01:46:19 +00:00
syntax match neosnippetName
2013-04-12 07:22:36 +00:00
\ '\s\+.*$' contained
2013-04-11 01:46:19 +00:00
syntax match neosnippetStatementAbbr
2013-04-12 07:22:36 +00:00
\ '^abbr\s.*$' contains=neosnippetAbbr,neosnippetKeyword
2013-04-11 01:46:19 +00:00
syntax match neosnippetAbbr
2013-04-12 07:22:36 +00:00
\ '\s\+.*$' contained
2013-04-11 01:46:19 +00:00
syntax match neosnippetStatementRank
2013-04-12 07:22:36 +00:00
\ '^rank\s.*$' contains=neosnippetRank,neosnippetKeyword
2013-04-11 01:46:19 +00:00
syntax match neosnippetRank
2013-04-12 07:22:36 +00:00
\ '\s\+\d\+$' contained
2013-04-11 01:46:19 +00:00
syntax match neosnippetStatementInclude
2013-04-12 07:22:36 +00:00
\ '^include\s.*$' contains=neosnippetInclude,neosnippetKeyword
2013-04-11 01:46:19 +00:00
syntax match neosnippetInclude
2013-04-12 07:22:36 +00:00
\ '\s\+.*$' contained
2015-12-23 12:05:12 +00:00
syntax match neosnippetStatementSource
\ '^source\s.*$' contains=neosnippetSource,neosnippetKeyword
syntax match neosnippetSource
\ '\s\+.*$' contained
2013-04-11 01:46:19 +00:00
syntax match neosnippetStatementDelete
2013-04-12 07:22:36 +00:00
\ '^delete\s.*$' contains=neosnippetDelete,neosnippetKeyword
2013-04-11 01:46:19 +00:00
syntax match neosnippetDelete
2013-04-12 07:22:36 +00:00
\ '\s\+.*$' contained
2013-04-11 01:46:19 +00:00
syntax match neosnippetStatementAlias
2013-04-12 07:22:36 +00:00
\ '^alias\s.*$' contains=neosnippetAlias,neosnippetKeyword
2013-04-11 01:46:19 +00:00
syntax match neosnippetAlias
2013-04-12 07:22:36 +00:00
\ '\s\+.*$' contained
2013-04-11 01:46:19 +00:00
syntax match neosnippetStatementOptions
2013-04-12 07:22:36 +00:00
\ '^options\s.*$' contains=neosnippetOption,neosnippetKeyword
2013-04-11 01:46:19 +00:00
syntax match neosnippetPlaceHolderComment
2013-04-12 07:22:36 +00:00
\ '{\d\+:\zs#:.\{-}\ze\\\@<!}' contained
2012-02-02 04:33:35 +00:00
2013-04-11 01:46:19 +00:00
highlight def link neosnippetKeyword Statement
highlight def link neosnippetString String
highlight def link neosnippetName Identifier
highlight def link neosnippetAbbr Normal
highlight def link neosnippetEval Type
highlight def link neosnippetWord String
highlight def link neosnippetPlaceHolder Special
highlight def link neosnippetPlaceHolderComment Comment
highlight def link neosnippetVariable Special
highlight def link neosnippetComment Comment
highlight def link neosnippetInclude PreProc
2015-12-23 12:05:12 +00:00
highlight def link neosnippetSource PreProc
2013-04-11 01:46:19 +00:00
highlight def link neosnippetDelete PreProc
highlight def link neosnippetOption PreProc
highlight def link neosnippetAlias Identifier
highlight def link neosnippetEscape Special
2012-02-02 04:33:35 +00:00
2017-06-15 00:11:15 +00:00
let b:current_syntax = 'snippet'