From c840bdc71db0fb89cf5f20e353d3356c205e5b03 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 18 Jul 2018 22:20:42 +1200 Subject: Make /usr/include 'path' setting hinge on +unix --- vim/after/ftplugin/c.vim | 9 +++++++-- vim/after/ftplugin/cpp.vim | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'vim/after/ftplugin') diff --git a/vim/after/ftplugin/c.vim b/vim/after/ftplugin/c.vim index e101b20c..fff9de04 100644 --- a/vim/after/ftplugin/c.vim +++ b/vim/after/ftplugin/c.vim @@ -5,5 +5,10 @@ endif " Set comment formats setlocal include=^\\s*#\\s*include -setlocal path+=/usr/include -let b:undo_ftplugin .= '|setlocal include< path<' +let b:undo_ftplugin .= '|setlocal include<' + +" Include headers on UNIX +if has('unix') + setlocal path+=/usr/include + let b:undo_ftplugin .= '|setlocal path<' +endif diff --git a/vim/after/ftplugin/cpp.vim b/vim/after/ftplugin/cpp.vim index a826bf43..38c94330 100644 --- a/vim/after/ftplugin/cpp.vim +++ b/vim/after/ftplugin/cpp.vim @@ -5,5 +5,10 @@ endif " Set comment formats setlocal include=^\\s*#\\s*include -setlocal path+=/usr/include -let b:undo_ftplugin .= '|setlocal include< path<' +let b:undo_ftplugin .= '|setlocal include<' + +" Include headers on UNIX +if has('unix') + setlocal path+=/usr/include + let b:undo_ftplugin .= '|setlocal path<' +endif -- cgit v1.2.3