[TableGen] Allow asm writer to use up to 3 OpInfo tables instead of 2. This allows...
[oota-llvm.git] / utils / vim / vimrc
index 8b029daba58445ead0f08df0f35582a5c1cbc9fc..fd87d767d6f414adde0356b4dd77611af894b7ce 100644 (file)
@@ -85,6 +85,13 @@ augroup filetype
   au! BufRead,BufNewFile *.td     set filetype=tablegen
 augroup END
 
+" Enable syntax highlighting for reStructuredText files. To use, copy
+" rest.vim (http://www.vim.org/scripts/script.php?script_id=973)
+" to ~/.vim/syntax .
+augroup filetype
+ au! BufRead,BufNewFile *.rst     set filetype=rest
+augroup END
+
 " Additional vim features to optionally uncomment.
 "set showcmd
 "set showmatch
@@ -92,14 +99,10 @@ augroup END
 "set incsearch
 "set ruler
 
-" Clang code-completion support. This is highly experimental!
+" Clang code-completion support. This is somewhat experimental!
 
-" TODO: code-completing on
-"          cast_cast<
-" turns up some peculiarities -- "asm("? 
-
-" A path to the a executable.
-let g:clang_path = "Release/bin/clang++"
+" A path to a clang executable.
+let g:clang_path = "clang++"
 
 " A list of options to add to the clang commandline, for example to add
 " include paths, predefined macros, and language options.
@@ -155,7 +158,14 @@ function! ClangComplete(findstart, base)
            let l:value = l:value[:l:spacecolonspace-1]
         endif
 
-        " Handle Pattern. TODO: Make clang less weird.
+        " Chop off " (Hidden)", if present, and move it to the menu.
+        let l:hidden = stridx(l:value, " (Hidden)")
+        if l:hidden != -1
+           let l:menu .= " (Hidden)"
+           let l:value = l:value[:l:hidden-1]
+        endif
+
+        " Handle "Pattern". TODO: Make clang less weird.
         if l:value == "Pattern"
            let l:value = l:menu
            let l:pound = stridx(l:value, "#")
@@ -213,5 +223,6 @@ function! ClangComplete(findstart, base)
    return []
 endfunction ClangComplete
 
-" Uncomment this to enable the highly-broken autocompletion support.
-"set omnifunc=ClangComplete
+" This to enables the somewhat-experimental clang-based
+" autocompletion support.
+set omnifunc=ClangComplete