vim-dict is a dict client. It uses curl to connect to dict servers, so make sure you have curl installed.
Place in ~/.vim/plugin/dict.vim or in case of Pathogen:
cd ~/.vim/bundle git clone https://github.com/szw/vim-dict.git
To lookup a word (or words) in the dictionary use
:Dict hello :Dict start up
Dict command uses hosts and databases defined in the
g:dict_hosts global list. By default it is set to
["all"]]] (the format will be explained a bit later).
Dict command can use a current word under the cursor. Just move the cursor to
a word and type in the command line:
You can also select words in the visual mode with help of the
There are just a few global variables (options) you may set in the .vimrc file.
The most important one is a list
g:dict_hostsmentioned earlier. It combines hosts/databases used by vim-dict. The list entries are lists themselves and share the following format:
["host_name", ["database1", "database2", ...]]
The sample extract from someone's ~/.vimrc file could look like this:
let g:dict_hosts = [ \["dict.org", ["all"]], \["dict.mova.org", ["slovnyk_en-pl", "slovnyk_pl-en"]] \]
Moreover vim-dict can help you figure out what databases are available on your servers. There is a special command for this:
You can even open your .vimrc and provide some host urls only:
let g:dict_hosts = [ \["dict.org", ], \["dict.mova.org", ] \]
Then save and reload .vimrc, perform
DictShowDband yank-paste the databases you want :).
The list of DICT servers can be found on the internet, e.g. here.
If set to
1vim-dict leaves the preview window (the focus remains on the current window). By default it is set to
let g:dict_leave_pw = 0
On Ubuntu you might want to add system dictionary to Vim:
This will enable the dictionary in the insert mode (CTRL-X CTRL-K). Additionaly it could
be useful to add the dictionary to the standard word completions (CTRL-N...) for text and
Markdown file types. To do this set the
complete to include k value:
au FileType text,markdown setlocal complete+=k
Copyright © 2012 Szymon Wrozynski. Distributed under the same terms as Vim itself.