Last active
August 29, 2015 14:08
-
-
Save pbhandari/1307c8989e92a2368f16 to your computer and use it in GitHub Desktop.
orq development for vim and syntastic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! SetupEnvironment() | |
let l:path = expand('%:p') | |
if l:path =~ '~/code/orq' | |
if &filetype != 'cpp' && &filetype != 'h' | |
return | |
endif | |
let g:syntastic_cpp_check_header = 1 | |
let g:syntastic_cpp_auto_refresh_includes = 1 | |
let g:syntastic_cpp_no_include_search = 0 | |
let g:syntastic_cpp_include_dirs = [ '~/code/orq/include' ] | |
let g:syntastic_cpp_compiler_options = '-std=c++0x' | |
let g:syntastic_cpp_compiler = 'clang++' | |
setlocal cinoptions+=h0,t0 | |
setlocal path+=~/code/orq/include, | |
setlocal fileformat=unix | |
endif | |
endfunction | |
autocmd! BufReadPost,BufNewFile * call SetupEnvironment() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment