Home

Awesome

vim-dict

vim-dict is a dict client. It uses curl to connect to dict servers, so make sure you have curl installed.

Installation

Place in ~/.vim/plugin/dict.vim or in case of Pathogen:

cd ~/.vim/bundle
git clone https://github.com/szw/vim-dict.git

Please, don't forget to star the repository if you like (and use) the plugin. This will let me know how many users it has and then how to proceed with further development :).

Usage

To lookup a word (or words) in the dictionary use Dict command:

:Dict hello
:Dict start up

The Dict command uses hosts and databases defined in the g:dict_hosts global list. By default it is set to [["dict.org", ["all"]]] (the format will be explained a bit later).

Dict command can use a word under the cursor. Just move the cursor to a word and type in the command line:

:Dict

The same works on selection - just select multiple words in the Visual mode.

The :Dict command will open a preview window. To close that window you may run :pc, or just hit q if the Dict window is the active one.

Configuration

There are just a few global variables (options) you may set in the .vimrc file.

Useful tips

On Ubuntu you might want to add system dictionary to Vim:

set dictionary+=/usr/share/dict/words

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

License

Copyright © 2012 Szymon Wrozynski. Distributed under the same terms as Vim itself. See :help license