Skip to content

rhysd/nyaovim-popup-tooltip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Popup Tooltip UI for NyaoVim

This is a NyaoVim UI plugin to provide popup tooltip which shows images on Neovim.

screenshot

Installation

This is normal Neovim plugin. Please put this repo to the directory in runtimepath. If you use a plugin manager, install this plugin as other plugins.

After installing this repository as Neovim plugin, put <popup-tooltip> component to your ~/.config/nyaovimrc.html.

<neovim-editor id="nyaovim-editor" argv$="[[argv]]"></neovim-editor>
<!-- Add below line -->
<popup-tooltip editor="[[editor]]"></popup-tooltip>

Usage

This plugin defines two <Plug>(nyaovim-popup-tooltip-open) mapping on normal mode and visual mode. You can map it.

If g:nyaovim_popup_tooltip_default_mapping is not set to 0, this plugin overrides gi mapping. Below mappings are defined.

nmap <silent>gi <Plug>(nyaovim-popup-tooltip-open)
vmap <silent>gi <Plug>(nyaovim-popup-tooltip-open)

When you enter gi on path to image (both local path and remote http address will do), NyaoVim shows up image tooltip as above screenshot. Popup emerges on the cursor.

And three functions are available.

  • TogglePopupTooltip(path, line, col)
  • OpenPopupTooltip(path, line, col)
  • ClosePopupTooltip()

License

Licensed MIT License.

Copyright (c) 2015 rhysd

About

Image popup tooltip plugin for NyaoVim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published