All Projects → kristijanhusak → vim-simple-notifications

kristijanhusak / vim-simple-notifications

Licence: MIT license
No description, website, or topics provided.

Programming Languages

Vim Script
2826 projects

vim-simple-notifications

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.

Example usage

All options provided via 2nd argument have default options. Check autoload/notifications.vim

notifications#info(msg: [List|String], opts: Dictionary)

call notifications#info(['This is an info notification', 'that spans multiple lines'])

screenshot-info

notifications#warning(msg: [List|String], opts: Dictionary)

call notifications#warning(['This is a warning', 'in the top left corner'], {'pos': 'topleft'})

screenshot-warning

notifications#error(msg: [List|String], opts: Dictionary)

call notifications#error(['Something went wrong', 'Please check your logs'], {'pos': 'top', 'width': 30, 'delay': 10000 })

screenshot-error

With title

call notifications#error(['Something went wrong', 'Please check your logs'], {'title': '[MyAwesomePlugin]'})

screenshot-error-title

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].