Simple notification plugin to be used mostly by plugin developers.
Uses floating/popup window if available, and falls back to echo
if popups are not available.
Can be used as a standalone plugin:
" Vim packager
call packager#add('kristijanhusak/vim-simple-notifications')
" Vim Plug
Plug 'kristijanhusak/vim-simple-notifications'
or just copy autoload/notifications.vim
file to your autoload
folder, adapt public function names and you're good to go.
All options provided via 2nd argument have default options. Check autoload/notifications.vim
call notifications#info(['This is an info notification', 'that spans multiple lines'])
call notifications#warning(['This is a warning', 'in the top left corner'], {'pos': 'topleft'})
call notifications#error(['Something went wrong', 'Please check your logs'], {'pos': 'top', 'width': 30, 'delay': 10000 })
With title
call notifications#error(['Something went wrong', 'Please check your logs'], {'title': '[MyAwesomePlugin]'})