From 61ad1432240290f889ef11a4b527163cc8fff83d Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 29 Nov 2018 23:23:06 +1300 Subject: Simplify after/ftplugin for C Allow the cpp plugin to load this, since it's the same anyway, and push all the undo stuff together. --- vim/after/ftplugin/c.vim | 11 +++-------- vim/after/ftplugin/cpp.vim | 18 ------------------ 2 files changed, 3 insertions(+), 26 deletions(-) delete mode 100644 vim/after/ftplugin/cpp.vim (limited to 'vim/after') diff --git a/vim/after/ftplugin/c.vim b/vim/after/ftplugin/c.vim index da34d269..ccc5b170 100644 --- a/vim/after/ftplugin/c.vim +++ b/vim/after/ftplugin/c.vim @@ -1,18 +1,13 @@ -" Extra configuration for C files -if &filetype !=# 'c' || v:version < 700 - finish -endif - " Include macros in completion setlocal complete+=d -let b:undo_ftplugin .= '|setlocal complete<' " Set include pattern setlocal include=^\\s*#\\s*include -let b:undo_ftplugin .= '|setlocal include<' " Include headers on UNIX if has('unix') setlocal path+=/usr/include - let b:undo_ftplugin .= '|setlocal path<' endif + +" Undo all of the above +let b:undo_ftplugin .= '|setlocal complete< include< path<' diff --git a/vim/after/ftplugin/cpp.vim b/vim/after/ftplugin/cpp.vim deleted file mode 100644 index 4042fb84..00000000 --- a/vim/after/ftplugin/cpp.vim +++ /dev/null @@ -1,18 +0,0 @@ -" Extra configuration for C++ files -if &filetype !=# 'cpp' || v:version < 700 - finish -endif - -" Include macros in completion -setlocal complete+=d -let b:undo_ftplugin .= '|setlocal complete<' - -" Set include pattern -setlocal include=^\\s*#\\s*include -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