A Dutch thesaurus in vim
The wonderful thesaurus option in vim can be quite handy when writing in vim on a daily basis. As I often write in Dutch, here are the instructions to work with a Dutch thesaurus.
Fetching the thesaurus file
Download the plain text thesaurus from OpenTaal.org and unzip it to a location in your vim folder. In the code below, we’re just placing the file in the vim root, but you can adjust this to your own taste, of course.
DOMAIN='http://data.opentaal.org'; PATH='opentaalbank/thesaurus/download/thesaurus.txt.gz'; wget $DOMAIN/$PATH -O /tmp/thesaurus.txt.gz; zcat /tmp/thesaurus.txt.gz > ~/.vim/thesaurus.txt; rm -f /tmp/thesaurus.txt.gz;
Add the following line in your
.vimrc, and reload the config using
:so ~/.vimrc. When working in insert mode, you now can use
Ctrl-t to show a list of synonyms of the word under the current cursor position.