diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2026-02-16 14:31:51 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-16 14:31:51 +0800 |
| commit | b51fc202ce06ea980ea7ad1d25990ef509f113bb (patch) | |
| tree | 25c00f0b69407011930fff57ebe73b55f2a4270b /runtime/lua/vim/_meta/vimfn.lua | |
| parent | 1eb2ca9fcfbc5df443062c5a302f1da6b1a93377 (diff) | |
| download | rneovim-b51fc202ce06ea980ea7ad1d25990ef509f113bb.tar.gz rneovim-b51fc202ce06ea980ea7ad1d25990ef509f113bb.tar.bz2 rneovim-b51fc202ce06ea980ea7ad1d25990ef509f113bb.zip | |
vim-patch:3de7384: runtime(doc): Fix :help complete() example (#37891)
closes: vim/vim#18417
https://github.com/vim/vim/commit/3de73844afebe133ea7485cc9993bb8378a3717d
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Diffstat (limited to 'runtime/lua/vim/_meta/vimfn.lua')
| -rw-r--r-- | runtime/lua/vim/_meta/vimfn.lua | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index 10bb7d389f..ed9f1f8791 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -1017,14 +1017,16 @@ function vim.fn.col(expr, winid) end --- Insert mode completion. The popup menu will appear if --- specified, see |ins-completion-menu|. --- Example: >vim ---- inoremap <F5> <C-R>=ListMonths()<CR> --- ---- func ListMonths() ---- call complete(col('.'), ['January', 'February', 'March', ---- \ 'April', 'May', 'June', 'July', 'August', 'September', ---- \ 'October', 'November', 'December']) ---- return '' ---- endfunc +--- inoremap <F5> <C-R>=ListMonths()<CR> +--- +--- func ListMonths() +--- call complete(col('.'), ['January', 'February', 'March', +--- \ 'April', 'May', 'June', 'July', 'August', +--- \ 'September', 'October', 'November', 'December']) +--- return '' +--- endfunc +--- --- <This isn't very useful, but it shows how it works. Note that --- an empty string is returned to avoid a zero being inserted. --- |