summaryrefslogtreecommitdiffstats
path: root/utils/vim
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-01-21 21:47:51 +0000
committerDan Gohman <gohman@apple.com>2009-01-21 21:47:51 +0000
commit8e66ba4cd4d89522caa9b96f07043df6747db81e (patch)
tree0a97628119fe65f8da301889257ef95658089f3b /utils/vim
parentbe8c7195e40fab4eaa043d7f280d1ff66c32bb97 (diff)
downloadexternal_llvm-8e66ba4cd4d89522caa9b96f07043df6747db81e.zip
external_llvm-8e66ba4cd4d89522caa9b96f07043df6747db81e.tar.gz
external_llvm-8e66ba4cd4d89522caa9b96f07043df6747db81e.tar.bz2
Enable syntax highlighting of LLVM and tablegen files by default,
so that users don't have to copy text from the README to get this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62718 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/vim')
-rw-r--r--utils/vim/vimrc12
1 files changed, 12 insertions, 0 deletions
diff --git a/utils/vim/vimrc b/utils/vim/vimrc
index 1b2de0f..7b1fd87 100644
--- a/utils/vim/vimrc
+++ b/utils/vim/vimrc
@@ -58,3 +58,15 @@ command! DeleteTrailingWs :%s/\s\+$//
" Convert all tab characters to two spaces
command! Untab :%s/\t/ /g
+
+" Enable syntax highlighting for LLVM files. To use, copy
+" utils/vim/llvm.vim to ~/.vim/syntax .
+augroup filetype
+ au! BufRead,BufNewFile *.ll set filetype=llvm
+augroup END
+
+" Enable syntax highlighting for tablegen files. To use, copy
+" utils/vim/tablegen.vim to ~/.vim/syntax .
+augroup filetype
+ au! BufRead,BufNewFile *.td set filetype=tablegen
+augroup END