Added vim commands to defer with notification
This commit is contained in:
parent
ae12f02181
commit
d98733c7a2
1 changed files with 10 additions and 0 deletions
|
@ -7,4 +7,14 @@ function Defer(command, callback)
|
|||
\ })
|
||||
endfun
|
||||
|
||||
function s:echo(message)
|
||||
echom a:message
|
||||
endfun
|
||||
|
||||
function s:notify(message)
|
||||
call Defer('notify-send "Vim" "'.a:message.'"', { b -> 0 })
|
||||
endfun
|
||||
|
||||
comm -complete=shellcmd -nargs=* Defer call Defer(<q-args>, { buffer -> 0 })
|
||||
comm -complete=shellcmd -nargs=* DeferEcho call Defer(<q-args>, { buffer -> <SID>echo("Deferred job completed: ".<q-args>) })
|
||||
comm -complete=shellcmd -nargs=* DeferNotify call Defer(<q-args>, { buffer -> <SID>notify("Deferred job completed:\n$ ".<q-args>) })
|
||||
|
|
Loading…
Reference in a new issue