vimrc: conditionally add include dirs for c/cpp
This commit is contained in:
parent
19d41d61e3
commit
c2638d3719
11
.vim/vimrc
11
.vim/vimrc
@ -1011,6 +1011,17 @@ endif
|
|||||||
endfunction
|
endfunction
|
||||||
nnoremap <leader>hh :call HeaderToggle()<cr>
|
nnoremap <leader>hh :call HeaderToggle()<cr>
|
||||||
|
|
||||||
|
if(&filetype ==# 'c') || (&filetype ==# 'cpp')
|
||||||
|
if isdirectory('include')
|
||||||
|
set path+=include
|
||||||
|
elseif isdirectory('inc')
|
||||||
|
set path+=inc
|
||||||
|
elseif isdirectory('src/include')
|
||||||
|
set path+=src/include
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
silent function! LINUX()
|
silent function! LINUX()
|
||||||
return has('unix') && !has('macunix') && !has('win32unix')
|
return has('unix') && !has('macunix') && !has('win32unix')
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user