Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

ydict.vim

A (Neo)Vim plugin for ydict integration:

Prerequisite

Install ydict:

npm install -g ydict.js

Usage

  • Search 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'

Testing

Developers can run the vim-spec tests:

gem install bundler # first time
bundle install # first time
bundle exec vim-flavor test# every time

License

This 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages