mirror of
https://github.com/neovim/neovim.git
synced 2026-02-19 01:48:30 +00:00
vim-patch:3de7384: runtime(doc): Fix :help complete() example (#37891)
closes: vim/vim#18417
3de73844af
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
16
runtime/lua/vim/_meta/vimfn.lua
generated
16
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -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.
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user