Skip to content

A Simple Wrapper Over The Dict CLI Utility For Vim9

License

Notifications You must be signed in to change notification settings

wolandark/vimdict

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

VimDict

A Simple Wrapper Over The Dict CLI Utility For Vim9

Dependency

  • dict
  • +vim9script
  • +popupwin

This plugin is written in vim9script and utilizes the popup feature of Vim, therefore it requires a vim 9.0+ compiled with +popupwin option.
You can check this in Vim with echo has('popupwin') and echo has('vim9script'). If Vim returns 1, then you have what this plugin needs.

Install dict on your distro:

apt install dict

pacman -S dict

Install VimDict

use your favorite plugin manager,
or:

git clone https://github.com/wolandark/vimdict.git ~/.vim/pack/plugins/start/vimdict

or for on-demand loading of the plugin:

git clone https://github.com/wolandark/vimdict.git ~/.vim/pack/plugins/opt/vimdict

for on-deman loading do:

:packadd vimdict

:Dict

Usage

Put your cursor on a word and issue :Dict, (No need to select visually or copy the word, that's just for the demo). Move the cursor to dismiss the popup or press Esc.

Configuration

You can specify colors for the popup in vimrc, othereise vimdict will use the default highlight group which creates a white on black popup.

let g:dict_popup_fgcolor = 'Black'
let g:dict_popup_bgcolor = 'White'

Optionally, define a mapping to call :Dict

nnoremap <F2> :Dict<CR>

Demo

output1

If you have suggestions, or find issues, feel free to let me know

Enjoy

About

A Simple Wrapper Over The Dict CLI Utility For Vim9

Topics

Resources

License

Stars

Watchers

Forks