From 0212af962e3a7664e1b3a2d3e68796b6ff5e8af4 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Sat, 4 Oct 2025 20:19:23 +0200 Subject: [PATCH] sensible default path variable only include the header folders if c files are opened --- vim/.vimrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vim/.vimrc b/vim/.vimrc index c884c85..9ab7429 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -65,8 +65,11 @@ set wildignore=*.o,*.obj,.git/**,tags,*.pyc " for c tests set errorformat^=[----]\ %f:%l:\ %m +set path=** " language specific makeprgs +autocmd BufNewFile,BufRead *.h set filetype=c +autocmd FileType c setlocal path+=/usr/local/include,/usr/include autocmd FileType python setlocal makeprg=basedpyright autocmd FileType go setlocal makeprg=go noexpandtab autocmd FileType csharp setlocal makeprg=dotnet