blob: d999788809c17ba90dddffe5ddba89b757310e1b [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001-*- llvm/utils/vim/README -*-
2
3These are syntax highlighting files for the VIM editor. Included are:
4
5* llvm.vim
6
Dan Gohman9b3a88f2009-01-21 21:52:42 +00007 Syntax highlighting mode for LLVM assembly files. To use, copy `llvm.vim' to
Dan Gohmanf17a25c2007-07-18 16:29:46 +00008 ~/.vim/syntax and add this code to your ~/.vimrc :
9
10 augroup filetype
11 au! BufRead,BufNewFile *.ll set filetype=llvm
Dan Gohmanf17a25c2007-07-18 16:29:46 +000012 augroup END
13
14* tablegen.vim
15
Dan Gohman9b3a88f2009-01-21 21:52:42 +000016 Syntax highlighting mode for TableGen description files. To use, copy
Dan Gohmanf17a25c2007-07-18 16:29:46 +000017 `tablegen.vim' to ~/.vim/syntax and add this code to your ~/.vimrc :
18
19 augroup filetype
20 au! BufRead,BufNewFile *.td set filetype=tablegen
21 augroup END
22
23
Dan Gohman9b3a88f2009-01-21 21:52:42 +000024If you prefer, instead of making copies you can make symlinks from
25~/.vim/syntax/... to the syntax files in your LLVM source tree. Apparently
26did not work with older versions of vim however, so if this doesn't work
27you may need to make actual copies of the files.
Dan Gohmanf17a25c2007-07-18 16:29:46 +000028
Dan Gohman9b3a88f2009-01-21 21:52:42 +000029Another option, if you do not already have a ~/.vim/syntax directory, is
30to symlink ~/.vim/syntax itself to llvm/utils/vim .
Dan Gohmanf17a25c2007-07-18 16:29:46 +000031
32Note: If you notice missing or incorrect syntax highlighting, please contact
33<llvmbugs [at] cs.uiuc.edu>; if you wish to provide a patch to improve the
34functionality, it will be most appreciated. Thank you.
35
36If you find yourself working with LLVM Makefiles often, but you don't get syntax
37highlighting (because the files have names such as Makefile.rules or
38TEST.nightly.Makefile), add the following to your ~/.vimrc:
39
40 " LLVM Makefile highlighting mode
41 augroup filetype
42 au! BufRead,BufNewFile *Makefile* set filetype=make
43 augroup END