xaizek / vim-inccomplete (License: Vim) (since 2018-12-07)
Vim plugin for #include directive completion in C family of languages.
Commit 8affaf475b25c830d44a5393c5ee289e47d04c0c

Allow "-completion relative to project root
Something else should set b:inccomplete_root to make it work.
Author: xaizek
Author date (UTC): 2015-08-29 15:37
Committer name: xaizek
Committer date (UTC): 2015-08-29 15:37
Parent(s): 724f4f99b3328ac306fec6ff6129ef2c659ed75f
Signing key:
Tree: e60aedba243398984cba851cc4452b6ec15bf509
File Lines added Lines deleted
doc/inccomplete.txt 9 1
plugin/inccomplete.vim 7 2
File doc/inccomplete.txt changed (mode: 100644) (index 15ced9d..50b5c67)
1 *inccomplete.txt* For Vim version 7.3. Last change: 2013 Nov 24
1 *inccomplete.txt* For Vim version 7.3. Last change: 2015 Aug 29
2 2
3 3
4 4 inccomplete plugin documentation by xaizek inccomplete plugin documentation by xaizek
 
... ... If value of this option evaluates to true, the plugin will append a slash
114 114 to directory name completion items. Otherwise slashes will be added in the to directory name completion items. Otherwise slashes will be added in the
115 115 menu only. menu only.
116 116
117 root for local includes *inccomplete-root*
118 *b:inccomplete_root*
119 type: string
120 default: not set
121
122 When this option if set for current buffer, the plugin uses it as base
123 directory for local completion.
124
117 125 ============================================================================== ==============================================================================
118 126 3. ToDo *inccomplete-todo* 3. ToDo *inccomplete-todo*
119 127
File plugin/inccomplete.vim changed (mode: 100644) (index c5e465f..3c606ea)
1 1 " Name: inccomplete " Name: inccomplete
2 2 " Author: xaizek <xaizek@openmailbox.org> " Author: xaizek <xaizek@openmailbox.org>
3 " Version: 1.6.40
3 " Version: 1.7.40
4 4 " License: Same terms as Vim itself (see :help license) " License: Same terms as Vim itself (see :help license)
5 5 " "
6 6 " See :help inccomplete for documentation. " See :help inccomplete for documentation.
 
... ... function! s:ICFilterIncLst(user, inclst, base)
267 267
268 268 " handle multicomponent paths (e.g. "a/...", <boost/...>) " handle multicomponent paths (e.g. "a/...", <boost/...>)
269 269 if l:pos >= 0 if l:pos >= 0
270 let l:inclst = s:ICFilter(a:user, l:inclst, a:base, s:ICGetDir())
270 let l:lst = s:ICFilter(a:user, l:inclst, a:base, s:ICGetDir())
271 if exists('b:inccomplete_root')
272 let l:lst += s:ICFilter(a:user, l:inclst, a:base,
273 \ b:inccomplete_root)
274 endif
275 let l:inclst = l:lst
271 276 endif endif
272 277
273 278 return l:inclst return l:inclst
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vim-inccomplete

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vim-inccomplete

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master