diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2016-07-23 11:33:38 +0900 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-08-01 03:33:38 -0400 |
commit | 23f591dba078fee16ab6e4debfcd051e799ca4f8 (patch) | |
tree | 0a469e39398562b3145821b8b9b1ed124e9b48a1 /runtime | |
parent | 70ae6ac344472e51ac75316992e2c03464b4f6ad (diff) | |
download | rneovim-23f591dba078fee16ab6e4debfcd051e799ca4f8.tar.gz rneovim-23f591dba078fee16ab6e4debfcd051e799ca4f8.tar.bz2 rneovim-23f591dba078fee16ab6e4debfcd051e799ca4f8.zip |
[RFC] vim-patch:7.4.2011, vim-patch:7.4.2012, vim-patch:7.4.2066 #5106
vim-patch:7.4.2011
Problem: It is not easy to get a list of command arguments.
Solution: Add getcompletion(). (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/aa4d73235bf4deee167aa5314b89ae3d3db334b7
vim-patch:7.4.2012
Problem: Test for getcompletion() does not pass on all systems.
Solution: Only test what is supported.
https://github.com/vim/vim/commit/0d3e24be5686c0710aa3c6671e4c626d6cb21a5f
vim-patch:7.4.2066
Problem: getcompletion() not well tested.
Solution: Add more testing.
https://github.com/vim/vim/commit/c1fb763184c8ae82300357867fa2070aa94366e9
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 9ff97436bb..de1ced160c 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1887,6 +1887,7 @@ getcmdline() String return the current command-line getcmdpos() Number return cursor position in command-line getcmdtype() String return current command-line type getcmdwintype() String return current command-line window type +getcompletion({pat}, {type}) List list of cmdline completion matches getcurpos() List position of the cursor getcwd([{winnr} [, {tabnr}]]) String the current working directory getfontname([{name}]) String name of font being used @@ -3647,6 +3648,49 @@ getcmdwintype() *getcmdwintype()* values are the same as |getcmdtype()|. Returns an empty string when not in the command-line window. +getcompletion({pat}, {type}) *getcompletion()* + Return a list of command-line completion matches. {type} + specifies what for. The following completion types are + supported: + + augroup autocmd groups + buffer buffer names + behave :behave suboptions + color color schemes + command Ex command (and arguments) + compiler compilers + cscope |:cscope| suboptions + dir directory names + environment environment variable names + event autocommand events + expression Vim expression + file file and directory names + file_in_path file and directory names in |'path'| + filetype filetype names |'filetype'| + function function name + help help subjects + highlight highlight groups + history :history suboptions + locale locale names (as output of locale -a) + mapping mapping name + menu menus + option options + shellcmd Shell command + sign |:sign| suboptions + syntax syntax file names |'syntax'| + syntime |:syntime| suboptions + tag tags + tag_listfiles tags, file names + user user names + var user variables + + If {pat} is an empty string, then all the matches are returned. + Otherwise only items matching {pat} are returned. See + |wildcards| for the use of special characters in {pat}. + + If there are no matches, an empty list is returned. An + invalid value for {type} produces an error. + *getcurpos()* getcurpos() Get the position of the cursor. This is like getpos('.'), but includes an extra item in the list: |