vimrc: conditionally add include dirs for c/cpp

This commit is contained in:
surtur 2022-08-12 20:59:51 +02:00
parent 19d41d61e3
commit c2638d3719
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -1011,6 +1011,17 @@ endif
endfunction
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()
return has('unix') && !has('macunix') && !has('win32unix')
endfunction