Vim plugin for dictionary lookups using dict.cc
vim-dictcc requires python3 support. Check by running
:echo has('python3')
in vim, which should return 1
.
In neovim you can use :checkhealth provider
, which has a more helpful interface.
Further you need to have the python module BeautifulSoup installed. Use your package manager or pip:
pip install beautifulsoup4
Remember to call this with sudo
to install system-wide.
Use your plugin manager of choice:
- Pathogen
git clone https://github.com/weinshec/vim-dictcc ~/.vim/bundle/vim-dictcc
- Vundle
- Add
Bundle 'weinshec/vim-dictcc'
to .vimrc - Run
:BundleInstall
- Add
- NeoBundle
- Add
NeoBundle 'weinshec/vim-dictcc'
to .vimrc - Run
:NeoBundleInstall
- Add
- vim-plug
- Add
Plug 'weinshec/vim-dictcc'
to .vimrc - Run
:PlugInstall
- Add
The plugin supports simple online lookups ENG <-> DEU for now and provides a vim-command for querying, e.g.
:Dict lunch
will query for lunch and show the results in a newly created buffer.
DictCur
queries for the word under cursor, which is convenient to map, e.g.
inoremap <c-s> <Esc>:DictCur<CR>
nnoremap <c-s> :DictCur<CR>
Now Ctrl-s in normal
and insert
mode will query for a translation.
The newly created dictcc
buffer can be closed by pressing the q
key.
vim-dictcc is in an early stage of development and your help is appreciated. Feel free to create issues and contribute PRs.