From c33be75a6c588914e82c88d4fbfbecc3bdef1ddf Mon Sep 17 00:00:00 2001 From: thawk Date: Fri, 31 Oct 2014 14:52:26 +0800 Subject: [PATCH] import include path from &path Add option g:clang_use_path. If set, import include path from &path. --- plugin/clang.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/plugin/clang.vim b/plugin/clang.vim index ca243d4..6be930b 100644 --- a/plugin/clang.vim +++ b/plugin/clang.vim @@ -108,6 +108,10 @@ if !exists('g:clang_vim_exec') endif endif +if !exists('g:clang_use_path') + let g:clang_use_path = 1 +endif + " Init on c/c++ files au FileType c,cpp call ClangCompleteInit(0) "}}} @@ -721,6 +725,21 @@ func! s:ClangCompleteInit(force) endfor endif + " parse include path from &path + if g:clang_use_path + let l:dirs = map(split(&path, '\\\@