1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-09 12:50:05 +08:00

Update doc for prompt api

This commit is contained in:
wsdjeg 2017-07-09 14:44:19 +08:00
parent fe2bf4b59e
commit 5d9e3dbf74
3 changed files with 19 additions and 7 deletions

View File

@ -1,11 +1,10 @@
"" ""
" @section cmdlinemenu, api-cmdlinemenu " @section prompt, api-prompt
" @parentsection api " @parentsection api
" menu({items}) " open()
" "
" Create a cmdline selection menu from a list of {items}, each item should be a " Create a cmdline prompt, use while loop to get the input from user. The
" list of two value in it, first one is the description, and the next one " default mapping for prompt is:
" should be a funcrc.
let s:self = {} let s:self = {}

View File

@ -107,6 +107,10 @@ function! SpaceVim#default#SetOptions() abort
set ttimeout set ttimeout
set ttimeoutlen=50 set ttimeoutlen=50
set lazyredraw set lazyredraw
if has('patch-7.4.314')
" don't give ins-completion-menu messages.
set shortmess+=c
endif
endfunction endfunction
function! SpaceVim#default#SetPlugins() abort function! SpaceVim#default#SetPlugins() abort

View File

@ -50,8 +50,9 @@ CONTENTS *SpaceVim-contents*
6. API........................................................|SpaceVim-api| 6. API........................................................|SpaceVim-api|
1. cmdlinemenu................................|SpaceVim-api-cmdlinemenu| 1. cmdlinemenu................................|SpaceVim-api-cmdlinemenu|
2. data#list....................................|SpaceVim-api-data-list| 2. data#list....................................|SpaceVim-api-data-list|
3. sid............................................|SpaceVim-api-vim-sid| 3. prompt..........................................|SpaceVim-api-prompt|
4. vim#message................................|SpaceVim-api-vim-message| 4. sid............................................|SpaceVim-api-vim-sid|
5. vim#message................................|SpaceVim-api-vim-message|
7. FAQ........................................................|SpaceVim-faq| 7. FAQ........................................................|SpaceVim-faq|
============================================================================== ==============================================================================
@ -982,6 +983,14 @@ listpart({list}, {start}[, {len}])
The result is a List, which is part of {list}, starting from index {start}, The result is a List, which is part of {list}, starting from index {start},
with the length {len} with the length {len}
==============================================================================
PROMPT *SpaceVim-api-prompt*
open()
Create a cmdline prompt, use while loop to get the input from user. The
default mapping for prompt is:
============================================================================== ==============================================================================
SID *SpaceVim-api-vim-sid* SID *SpaceVim-api-vim-sid*