Browse Source

Add Vim syntax file

Peter Colberg 3 years ago
parent
commit
ee9d77b839
1 changed files with 14 additions and 0 deletions
  1. 14
    0
      contrib/templet.vim

+ 14
- 0
contrib/templet.vim View File

@@ -0,0 +1,14 @@
1
+" Vim syntax file for Templet preprocessor.
2
+" Copyright © 2012–2015 Peter Colberg.
3
+" Distributed under the MIT license. (See accompanying file LICENSE.)
4
+"
5
+" This file may be used to extend the syntax highlighting of any
6
+" language. For example, to highlight Templet statements in OpenCL
7
+" files, copy this file to ~/.vim/after/syntax/opencl/templet.vim
8
+
9
+syn region templetLine		matchgroup=Operator start="^\s*|" end="$"
10
+syn region templetCondNest	start=/{/ end=/}/ contained transparent contains=templetCondNest
11
+syn region templetExpr		matchgroup=Operator start="\${" end="}" contains=templetCondNest
12
+
13
+hi def link templetLine		PreProc
14
+hi def link templetExpr		PreProc

Loading…
Cancel
Save