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
"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.
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, "#")
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