Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Some improvements to Syntax highlighting including support for ${VISUAL}

  • Loading branch information...
commit b0827fe3f68c3679ed75d147fb26696adcc3d2d6 1 parent 49d9ff2
Holger Rapp authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 syntax/snippets.vim
8 syntax/snippets.vim
View
@@ -6,6 +6,7 @@ if exists("b:current_syntax")
endif
syntax include @Python syntax/python.vim
+syntax include @Viml syntax/vim.vim
" global matches
syn match snipComment "^#.*" contains=snipTODO
@@ -22,11 +23,13 @@ syn match snipExtends "^extends.*" contains=snipKeyword
" snippet definitions
syn match snipStart "^snippet.*" contained contains=snipKeyword,snipString
syn match snipEnd "^endsnippet" contained contains=snipKeyword
-syn region snipCommand contained keepend start="`" end="`" contains=snipPythonCommand
+syn region snipCommand contained keepend start="`" end="`" contains=snipPythonCommand,snipVimLCommand
syn region snipPythonCommand contained keepend start="`!p" end="`" contained contains=@Python
+syn region snipVimLCommand contained keepend start="`!v" end="`" contained contains=@Viml
syn match snipVar "\$\d" contained
+syn region snipVisual matchgroup=Define start="\${VISUAL" end="}" contained
syn region snipVarExpansion matchgroup=Define start="\${\d" end="}" contained contains=snipVar,snipVarExpansion,snipCommand
-syn region snippet fold keepend start="^snippet" end="^endsnippet" contains=snipStart,snipEnd,snipTabsOnly,snipCommand,snipVarExpansion,snipVar
+syn region snippet fold keepend start="^snippet" end="^endsnippet" contains=snipStart,snipEnd,snipTabsOnly,snipCommand,snipVarExpansion,snipVar,snipVisual
" global definitions
syn match snipGlobalStart "^global.*" contained contains=snipKeyword,snipString
@@ -48,6 +51,7 @@ hi link snipEnd Statement
hi link snipCommand Special
hi link snipVar StorageClass
hi link snipVarExpansion Normal
+hi link snipVisual Normal
hi link snippet Normal
hi link snipGlobalStart Statement
Please sign in to comment.
Something went wrong with that request. Please try again.