Misha Brukman | 115dc0d | 2003-08-11 17:56:08 +0000 | [diff] [blame] | 1 | -*- llvm/utils/vim/README -*- |
| 2 | |
| 3 | These are syntax highlighting files for the VIM editor. Included are: |
| 4 | |
| 5 | * llvm.vim |
| 6 | |
Dan Gohman | 907532d | 2009-01-21 21:52:42 +0000 | [diff] [blame] | 7 | Syntax highlighting mode for LLVM assembly files. To use, copy `llvm.vim' to |
Misha Brukman | 115dc0d | 2003-08-11 17:56:08 +0000 | [diff] [blame] | 8 | ~/.vim/syntax and add this code to your ~/.vimrc : |
| 9 | |
| 10 | augroup filetype |
| 11 | au! BufRead,BufNewFile *.ll set filetype=llvm |
Misha Brukman | 115dc0d | 2003-08-11 17:56:08 +0000 | [diff] [blame] | 12 | augroup END |
| 13 | |
| 14 | * tablegen.vim |
| 15 | |
Dan Gohman | 907532d | 2009-01-21 21:52:42 +0000 | [diff] [blame] | 16 | Syntax highlighting mode for TableGen description files. To use, copy |
Misha Brukman | 115dc0d | 2003-08-11 17:56:08 +0000 | [diff] [blame] | 17 | `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 Gohman | 907532d | 2009-01-21 21:52:42 +0000 | [diff] [blame] | 24 | If 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 Gohman | 748dbc6 | 2009-01-21 21:54:44 +0000 | [diff] [blame] | 26 | this did not work with older versions of vim however, so if this doesn't |
| 27 | work you may need to make actual copies of the files. |
Misha Brukman | 115dc0d | 2003-08-11 17:56:08 +0000 | [diff] [blame] | 28 | |
Dan Gohman | 907532d | 2009-01-21 21:52:42 +0000 | [diff] [blame] | 29 | Another option, if you do not already have a ~/.vim/syntax directory, is |
| 30 | to symlink ~/.vim/syntax itself to llvm/utils/vim . |
Misha Brukman | 3871f05 | 2003-08-11 18:05:19 +0000 | [diff] [blame] | 31 | |
Misha Brukman | 115dc0d | 2003-08-11 17:56:08 +0000 | [diff] [blame] | 32 | Note: 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 |
| 34 | functionality, it will be most appreciated. Thank you. |
Misha Brukman | e38adf5 | 2004-05-19 21:20:40 +0000 | [diff] [blame] | 35 | |
| 36 | If you find yourself working with LLVM Makefiles often, but you don't get syntax |
| 37 | highlighting (because the files have names such as Makefile.rules or |
| 38 | TEST.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 |