mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 06:30:03 +08:00
docs(api): update :h SpaceVim-api-vim-message
This commit is contained in:
parent
689fafccf1
commit
e6626bdd37
@ -11,11 +11,37 @@
|
|||||||
" @parentsection api
|
" @parentsection api
|
||||||
" `vim#message` API provide functions for generating colored message in vim's
|
" `vim#message` API provide functions for generating colored message in vim's
|
||||||
" command line.
|
" command line.
|
||||||
|
" >
|
||||||
|
" let s:MSG = SpaceVim#api#import('vim#message')
|
||||||
|
" call s:MSG.echo('WarningMsg', 'hello world!')
|
||||||
|
" <
|
||||||
|
" @subsection functions
|
||||||
"
|
"
|
||||||
" echo({hi}, {msg})
|
" echo({hi}, {msg})
|
||||||
"
|
"
|
||||||
" print message with {hi} highlight group.
|
" print message with {hi} highlight group. The {msg} starts on a new line.
|
||||||
|
"
|
||||||
|
" echon({hi}, {msg})
|
||||||
|
"
|
||||||
|
" print message with {hi} highlight group. The {msg} will be displayed
|
||||||
|
" without anything added.
|
||||||
|
"
|
||||||
|
" echomsg({hi}, {msg})
|
||||||
|
"
|
||||||
|
" print message with {hi} highlight group. The {msg} starts on a new line.
|
||||||
|
" The {msg} also will be added to `:messages` history.
|
||||||
|
"
|
||||||
|
" error({msg})
|
||||||
|
"
|
||||||
|
" same as `echomsg('Error', {msg})`
|
||||||
|
"
|
||||||
|
" warn({msg})
|
||||||
|
"
|
||||||
|
" same as `echomsg('WarningMsg', {msg})`
|
||||||
|
"
|
||||||
|
" confirm({msg})
|
||||||
|
"
|
||||||
|
" promote a confirm message, accept user input `y/n`.
|
||||||
|
|
||||||
let s:self = {}
|
let s:self = {}
|
||||||
|
|
||||||
|
@ -5319,10 +5319,37 @@ VIM#MESSAGE *SpaceVim-api-vim-message*
|
|||||||
|
|
||||||
`vim#message` API provide functions for generating colored message in vim's
|
`vim#message` API provide functions for generating colored message in vim's
|
||||||
command line.
|
command line.
|
||||||
|
>
|
||||||
|
let s:MSG = SpaceVim#api#import('vim#message')
|
||||||
|
call s:MSG.echo('WarningMsg', 'hello world!')
|
||||||
|
<
|
||||||
|
FUNCTIONS
|
||||||
|
|
||||||
echo({hi}, {msg})
|
echo({hi}, {msg})
|
||||||
|
|
||||||
print message with {hi} highlight group.
|
print message with {hi} highlight group. The {msg} starts on a new line.
|
||||||
|
|
||||||
|
echon({hi}, {msg})
|
||||||
|
|
||||||
|
print message with {hi} highlight group. The {msg} will be displayed
|
||||||
|
without anything added.
|
||||||
|
|
||||||
|
echomsg({hi}, {msg})
|
||||||
|
|
||||||
|
print message with {hi} highlight group. The {msg} starts on a new line.
|
||||||
|
The {msg} also will be added to `:messages` history.
|
||||||
|
|
||||||
|
error({msg})
|
||||||
|
|
||||||
|
same as `echomsg('Error', {msg})`
|
||||||
|
|
||||||
|
warn({msg})
|
||||||
|
|
||||||
|
same as `echomsg('WarningMsg', {msg})`
|
||||||
|
|
||||||
|
confirm({msg})
|
||||||
|
|
||||||
|
promote a confirm message, accept user input `y/n`.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
VIM#WINDOW *SpaceVim-api-vim-window*
|
VIM#WINDOW *SpaceVim-api-vim-window*
|
||||||
|
Loading…
Reference in New Issue
Block a user