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

Add b:inccomplete_roots option
Replaces b:inccomplete_root.
Author: xaizek
Author date (UTC): 2019-04-19 11:51
Committer name: xaizek
Committer date (UTC): 2019-04-19 11:56
Parent(s): 2dc46daed1c7d895cb3e225649957b307067da85
Signing key: 99DC5E4DB05F6BE2
Tree: a731b9f90c2a31669fa6a4821f5ac401d75b6acf
File Lines added Lines deleted
README.md 4 1
doc/inccomplete.txt 12 3
plugin/inccomplete.vim 6 1
File README.md changed (mode: 100644) (index 618bc55..12e586e)
... ... can include:
16 16 - paths relative to the directory of current file - paths relative to the directory of current file
17 17 - `'-I'` keys from `g:clang_user_options` - `'-I'` keys from `g:clang_user_options`
18 18 - `'-I'` keys from `b:clang_user_options` - `'-I'` keys from `b:clang_user_options`
19 - paths relative to project root (if specified on configuration)
19
20 Additional sources for `""` completion can be specified via
21 `b:inccomplete_roots` (this is a list equivalent of older `b:inccomplete_root`
22 string option).
20 23
21 24 Sources for `<>` completion are: Sources for `<>` completion are:
22 25 - `'path'` option (on *nix it's set to `'/usr/include'` by default, but on - `'path'` option (on *nix it's set to `'/usr/include'` by default, but on
File doc/inccomplete.txt changed (mode: 100644) (index db995c3..921c1a6)
1 *inccomplete.txt* For Vim version 7.3. Last change: 2018 Apr 3
1 *inccomplete.txt* For Vim version 7.3. Last change: 2019 Apr 19
2 2
3 3
4 4 inccomplete plugin documentation by xaizek inccomplete plugin documentation by xaizek
 
... ... License: Same terms as Vim itself (see |license|)
18 18
19 19 This is a completion plugin for C/C++/ObjC/ObjC++ preprocessors include This is a completion plugin for C/C++/ObjC/ObjC++ preprocessors include
20 20 directive. It can be used along with clang_complete plugin directive. It can be used along with clang_complete plugin
21 (http://www.vim.org/scripts/script.php?script_id=3302).
21 (https://www.vim.org/scripts/script.php?script_id=3302).
22 22 And maybe with some others that haven't been tested. clang_complete And maybe with some others that haven't been tested. clang_complete
23 23 dependency is optional, though even if you don't use it you still can set its dependency is optional, though even if you don't use it you still can set its
24 24 options so that they affect this plugin. options so that they affect this plugin.
 
... ... If value of this option evaluates to true, the plugin will append a slash
128 128 to directory name completion items. Otherwise slashes will be added in the to directory name completion items. Otherwise slashes will be added in the
129 129 menu only. menu only.
130 130
131 extra sources for local includes *inccomplete-roots*
132 *b:inccomplete_roots*
133 type: list
134 default: []
135
136 If this option is set for current buffer, the plugin uses paths specified via
137 it as additional directory to search for local completion.
138
131 139 root for local includes *inccomplete-root* root for local includes *inccomplete-root*
132 140 *b:inccomplete_root* *b:inccomplete_root*
133 141 type: string type: string
134 142 default: not set default: not set
135 143
136 When this option if set for current buffer, the plugin uses it as base
144 Use |b:inccomplete-roots| instead.
145 If this option is set for current buffer, the plugin uses it as base
137 146 directory for local completion. directory for local completion.
138 147
139 148 list of sources for "" completion *inccomplete-localsources* list of sources for "" completion *inccomplete-localsources*
File plugin/inccomplete.vim changed (mode: 100644) (index 7a63c14..b2d12b0)
1 1 " Name: inccomplete " Name: inccomplete
2 2 " Author: xaizek <xaizek@posteo.net> " Author: xaizek <xaizek@posteo.net>
3 " Version: 1.8.51
3 " Version: 1.8.52
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:ICGetUserSources()
403 403 if exists('b:inccomplete_root') if exists('b:inccomplete_root')
404 404 let l:dirs = s:ICAddNoDupPaths(l:dirs, [b:inccomplete_root]) let l:dirs = s:ICAddNoDupPaths(l:dirs, [b:inccomplete_root])
405 405 endif endif
406
407 if exists('b:inccomplete_roots')
408 let l:dirs = s:ICAddNoDupPaths(l:dirs, b:inccomplete_roots)
409 endif
410
406 411 return l:dirs return l:dirs
407 412 endfunction endfunction
408 413
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