aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-22 20:03:43 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-22 20:03:43 +1200
commit60bd39cf3bbf8ec66c729c0803555b721643924b (patch)
treef2ae7156b93c99e373d0badb8cad67a184057882
parentMore tweaking for Vim tiny compatibility (diff)
downloaddotfiles-60bd39cf3bbf8ec66c729c0803555b721643924b.tar.gz
dotfiles-60bd39cf3bbf8ec66c729c0803555b721643924b.zip
Add d (macros) to C and C++ 'complete' setting
-rw-r--r--vim/after/ftplugin/c.vim7
-rw-r--r--vim/after/ftplugin/cpp.vim7
2 files changed, 10 insertions, 4 deletions
diff --git a/vim/after/ftplugin/c.vim b/vim/after/ftplugin/c.vim
index 34e9b8fd..9ac59733 100644
--- a/vim/after/ftplugin/c.vim
+++ b/vim/after/ftplugin/c.vim
@@ -3,12 +3,15 @@ if &filetype !=# 'c' || v:version < 700
finish
endif
+" Include macros in completion
+setlocal complete+=d
+
" 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
+
+let b:undo_ftplugin .= '|setlocal complete< include< path<'
diff --git a/vim/after/ftplugin/cpp.vim b/vim/after/ftplugin/cpp.vim
index ae100015..b5596613 100644
--- a/vim/after/ftplugin/cpp.vim
+++ b/vim/after/ftplugin/cpp.vim
@@ -3,12 +3,15 @@ if &filetype !=# 'cpp' || v:version < 700
finish
endif
+" Include macros in completion
+setlocal complete+=d
+
" 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
+
+let b:undo_ftplugin .= '|setlocal complete< include< path<'