summaryrefslogtreecommitdiff
path: root/utils/vim
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2003-08-11 18:05:19 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2003-08-11 18:05:19 +0000
commit3871f056712844cd10f22dd7771d60f1d837b6f6 (patch)
tree3eb6b027eef638d8ac3866b7d3477221f5bfc429 /utils/vim
parent00a61d4fd4e2172e762669a3175992679ef3518a (diff)
downloadllvm-3871f056712844cd10f22dd7771d60f1d837b6f6.tar.gz
llvm-3871f056712844cd10f22dd7771d60f1d837b6f6.tar.bz2
llvm-3871f056712844cd10f22dd7771d60f1d837b6f6.tar.xz
tablegen.vim:
* Added keyword `field' * Keywords get different highlighting than types * Added a simple attempt at multi-line C-style comments with FIXME README: * Added note about symlinking an entire directory ~/.vim/syntax git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7733 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/vim')
-rw-r--r--utils/vim/README4
-rw-r--r--utils/vim/tablegen.vim9
2 files changed, 9 insertions, 4 deletions
diff --git a/utils/vim/README b/utils/vim/README
index 6d103b5d48..af0949d852 100644
--- a/utils/vim/README
+++ b/utils/vim/README
@@ -25,6 +25,10 @@ These are syntax highlighting files for the VIM editor. Included are:
IMPORTANT: Making symlinks from ~/.vim/syntax/... to the syntax files in your
LLVM source tree does not work, you DO need to copy the files directly.
+However, if you do not already have a ~/.vim/syntax/ directory, simply
+symlinking it to llvm/utils/vim will do the trick nicely, and you can stay
+up-to-date with CVS.
+
Note: If you notice missing or incorrect syntax highlighting, please contact
<llvmbugs [at] cs.uiuc.edu>; if you wish to provide a patch to improve the
functionality, it will be most appreciated. Thank you.
diff --git a/utils/vim/tablegen.vim b/utils/vim/tablegen.vim
index f93fbed32e..41a0c59134 100644
--- a/utils/vim/tablegen.vim
+++ b/utils/vim/tablegen.vim
@@ -11,11 +11,13 @@ endif
syn case match
-syn keyword tgKeyword def let in code dag
-syn keyword tgType class int string list bit bits
+syn keyword tgKeyword def let in code dag field
+syn keyword tgType class int string list bit bits
syn match tgNumber /\<\d\+\>/
syn match tgNumber /\<\d\+\.\d*\>/
syn match tgComment /\/\/.*$/
+" FIXME: this does not capture multi-line C-style comments
+syn match tgComment /\/\*.*\*\//
syn region tgString start=/"/ skip=/\\"/ end=/"/
if version >= 508 || !exists("did_c_syn_inits")
@@ -26,9 +28,8 @@ if version >= 508 || !exists("did_c_syn_inits")
command -nargs=+ HiLink hi def link <args>
endif
- HiLink tgKeyword Type
+ HiLink tgKeyword Statement
HiLink tgType Type
- "HiLink llvmStatement Statement
HiLink tgNumber Number
HiLink tgComment Comment
HiLink tgString String