A (Neo)Vim plugin for ydict integration:
Install ydict:
npm install -g ydict.jsSearch a word under cursor:
" search a wordnnoremap<silent><Leader>d:call YDict([expand('<cword>'), expand('<cWORD>')])<Return>
Search a word for your selected text:
" search a wordvnoremap<silent><Leader>dy:<C-U>call YDict(getreg(0))<Return>
Configure where results are displayed:
" create window below current one (default)letg:ydict_results_window='new'" create window beside current oneletg:ydict_results_window='vnew'" use current window to show resultsletg:ydict_results_window='enew'" create panel at left-most edgeletg:ydict_results_window='topleft vnew'" create panel at right-most edgeletg:ydict_results_window='botright vnew'" create new tab beside current oneletg:ydict_results_window='tabnew'
Developers can run the vim-spec tests:
gem install bundler # first time
bundle install # first time
bundle exec vim-flavor test# every timeThis plugin is inspired by ydict.js https://github.com/sayuan/ydict.js/.
The code is copied from vim-dasht https://github.com/sunaku/vim-dasht.
Copyright 2018 Sean Lee https://github.com/weilonge
Distributed under the same terms as Vim itself.