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

Trigger completion on / or \ right before " or >
Thanks to BTNC.

See #5 on GitHub.
Author: xaizek
Author date (UTC): 2016-11-09 15:36
Committer name: xaizek
Committer date (UTC): 2016-11-09 15:39
Parent(s): b07b9ed1bb1208794511d1b9581809559bc5e62a
Signing key: 99DC5E4DB05F6BE2
Tree: b3d81fda36cad1d3f42bf4d8ae972a318c85c35e
File Lines added Lines deleted
plugin/inccomplete.vim 7 2
File plugin/inccomplete.vim changed (mode: 100644) (index 79363fb..9f15322)
1 1 " Name: inccomplete " Name: inccomplete
2 2 " Author: xaizek <xaizek@openmailbox.org> " Author: xaizek <xaizek@openmailbox.org>
3 " Version: 1.7.44
3 " Version: 1.7.45
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! ICCompleteInc(bracket)
109 109 endif endif
110 110
111 111 if a:bracket == '/' || a:bracket == '\' if a:bracket == '/' || a:bracket == '\'
112 if getline('.') =~ '^\s*#\s*include\s*["<][^">]*$'
112 " complete when there are no closing character or we're right before
113 " it
114 let l:curline = getline('.')
115 if l:curline =~ '^\s*#\s*include\s*["<][^">]*$' ||
116 \ (l:curline =~ '^\s*#\s*include\s*["<][^">]*[">]$' &&
117 \ (l:curline[col('.') - 1] == '"' || l:curline[col('.') - 1 ] == '>'))
113 118 return a:bracket.l:keycomp return a:bracket.l:keycomp
114 119 endif endif
115 120 endif endif
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