vim-ydict
is a Vim plugin for ydict, it helps you to query words from Vim.
vim-ydict relies on ydict, to use it, you need to install ydict first.
Use Homebrew to install ydict:
brew tap timothyye/tap
brew install timothyye/tap/skm
Or you can download it from the release page.
Now you can install vim-ydict
.
Plug 'TimothyYe/vim-ydict'
vim-ydict
supports 3 different query modes:
- Query words from current cursor position, supported by command
:Ydc
. - Query selected words from the select mode, supported by command
:Ydv
. - Query words from user's input, supported by command
:Yde
.
Edit your vimrc
file, add example settings.
- Press
Ctrl+t
to query selected words:
vnoremap <silent> <C-T> :<C-u>Ydv<CR>
- Use
<leader>+yc
to query words from current cursor position:
nnoremap <leader>yc :<C-u>Ydc<CR>
- Use
<leader>+yd
to input the words you want to query:
noremap <leader>yd :<C-u>Yde<CR>
The MIT License (MIT)