Skip to content

Instantly share code, notes, and snippets.

@pbhandari
Last active August 29, 2015 14:08
Show Gist options
  • Save pbhandari/1307c8989e92a2368f16 to your computer and use it in GitHub Desktop.
Save pbhandari/1307c8989e92a2368f16 to your computer and use it in GitHub Desktop.
orq development for vim and syntastic
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