sponsor Vim development Vim logo Vim Book Ad

vim-stardict : Looking up meaning of words inside Vim using SDCV dictionary

 script karma  Rating 12/9, Downloaded by 3791  Comments, bugs, improvements  Vim wiki

created by
Phong Cao
script type
**Note**: More information & screenshots available at https://github.com/phongvcao/vim-stardict

A Vim plugin for looking up meaning of words inside Vim and Bash using StarDict Command-Line Version (SDCV) dictionary program.

In addition to opening a Vim split and populating it with the output of StarDict Command-Line Version (SDCV), vim-stardict takes advantage of Vim syntax highlighting and some basic regexes to present the words' definitions to the users in an organized and user-friendly way.

The plugin was inspired and originally a fork of chusiang/vim-sdcv: https://github.com/chusiang/vim-sdcv
install details
**Note**: More information & screenshots available at https://github.com/phongvcao/vim-stardict

Before installing vim-stardict , the following applications need to be already installed in your computer:

    * SDCV

There are several ways to install vim-stardict:

    * Pathogen
        * git clone https://github.com/phongvcao/vim-stardict.git

    * NeoBundle
        * NeoBundle 'phongvcao/vim-stardict'

    * Vundle
        * Plugin 'phongvcao/vim-stardict'

    * Manual
        Copy all of the files into your ~/.vim directory

* Usage:

To lookup the meaning of a word with no-space-in-between:

:StarDict random_word_with_no_spaces

To lookup the meaning of a word with spaces-in-between, put it inside quotation marks (both double and single quotes are acceptable):

:StarDict "random word with spaces"
:StarDict 'random word with spaces'

To look up the meaning of several words (either no-spaces-in-between or spaces-in-between):

:StarDict first_word second_word "third word" 'fourth word'
:StarDict "first word" 'second word'

To lookup the meaning of a word under-the-cursor:


You can pass arguments of command-line sdcv to :StarDict and :StarDictCursor commands in Vim:

:StarDict first_word "second word" -u "my_dictionary" --data-dir /my/data/dir
:StarDictCursor -u "my_dictionary" --data-dir /my/data/dir

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-stardict-0.5.0.zip 0.5.0 2015-11-23 7.3 Phong Cao * stardict & vstardict commands on Bash/Zsh now accepts all arguments of command-line sdcv
vim-stardict-0.4.4.zip 0.4.4 2015-11-23 7.3 Phong Cao * :StarDict command now accepts --data-dir & -u arguments
* Fixed stardict.py Python piping issue that prevents sdcv -u from getting the definition
vim-stardict-0.4.3.zip 0.4.3 2015-06-23 7.3 Phong Cao * Switched back to /usr/bin/python instead of /usr/bin/env python
vim-stardict-0.4.2.zip 0.4.2 2015-06-23 7.3 Phong Cao * Replaced /usr/bin/python with /usr/bin/env python for stardict.py
* Added STARDICT_PYTHON_PATH variable to let users specify the python
executable they want to use to execute stardict.py
vim-stardict-0.4.1.zip 0.4.1 2015-06-09 7.3 Phong Cao * Fixed default Python 3 option
* Removed syntax file sourcing
* Removed g:stardict_prefer_python3 option
vim-stardict-0.4.0.zip 0.4.0 2015-04-19 7.3 Phong Cao * Added support for Zsh
* Added custom $STARDICT_DIR variable to let users specify vim-stardict installation directory
vim-stardict-0.3.3.zip 0.3.3 2015-03-19 7.3 Phong Cao * Fixed wrong highlighting of words' examples
vim-stardict-0.3.2.zip 0.3.2 2015-03-01 7.3 Phong Cao * Fixed :split and :vsplit opening delay
* Fixed multiple :split open at a time
* Reuse last 'stardict' buffer if there is one
* Hide 'vim-stardict' buffer from buffer list
* Removed buffer cache of old word meaning history
vim-stardict-0.3.1.zip 0.3.1 2015-03-01 7.3 Phong Cao * Restore mouse cursor after viewing definition
vim-stardict-0.3.0.zip 0.3.0 2015-03-01 7.3 Phong Cao * Added output colors customization for Vim and Bash
* Fixed extra split in Vim
vim-stardict.zip 0.2.0 2015-02-26 7.3 Phong Cao     * Added support for Bash
    * Added output redirection from Bash to Vim
    * Fixed some highlight errors on Vim and Bash
    * Changed highlighting color for "Found ... items"
vim-stardict.zip 0.1.0 2015-02-23 7.3 Phong Cao Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
Vim at Github