blob: bca25bfe612729c3fb0543edac0806cf64ea1941 [file] [log] [blame]
Misha Brukman61e66ba2003-08-11 17:56:08 +00001-*- llvm/utils/vim/README -*-
2
3These are syntax highlighting files for the VIM editor. Included are:
4
5* llvm.vim
6
Dan Gohman01d7dd82009-01-21 21:52:42 +00007 Syntax highlighting mode for LLVM assembly files. To use, copy `llvm.vim' to
Misha Brukman61e66ba2003-08-11 17:56:08 +00008 ~/.vim/syntax and add this code to your ~/.vimrc :
9
10 augroup filetype
11 au! BufRead,BufNewFile *.ll set filetype=llvm
Misha Brukman61e66ba2003-08-11 17:56:08 +000012 augroup END
13
14* tablegen.vim
15
Dan Gohman01d7dd82009-01-21 21:52:42 +000016 Syntax highlighting mode for TableGen description files. To use, copy
Misha Brukman61e66ba2003-08-11 17:56:08 +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 Gohman01d7dd82009-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
Dan Gohmand776b6e2009-01-21 21:54:44 +000026this did not work with older versions of vim however, so if this doesn't
27work you may need to make actual copies of the files.
Misha Brukman61e66ba2003-08-11 17:56:08 +000028
Dan Gohman01d7dd82009-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 .
Misha Brukman216ed652003-08-11 18:05:19 +000031
Misha Brukman61e66ba2003-08-11 17:56:08 +000032Note: 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.
Misha Brukmanbd094e72004-05-19 21:20:40 +000035
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