A Simple Wrapper Over The Dict CLI Utility For Vim9
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.
apt install dict
pacman -S dict
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
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
.
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>