a shell script for reading definition of words and phrases, and looking up dictionaries, using dict.
it requires dict and vim (or nvim, or any other vim-compatible editor).
archlinux users can use the AUR package (vimdict-git)[https://aur.archlinux.org/packages/opener-git]:
$ paru -S vimdict-git
otherwise:
$ git clone https://github.com/soystemd/vimdict
$ cd vimdict
$ sudo make install
while viewing definitions in vim, you can press shift+k on any word to look up the definition of that word in a new vim buffer (making use of vim's keyword lookup feature).
see vimdict -h
for more info.
- install
dictd
from your distro's package manager. - add
server dict.org
at the top of/etc/dict/dict.conf
.
now you can get word/phrase definitions by running:
$ dict <word-or-phrase>
provided you have an internet connection.
with the above config, dict gets definitions from dict.org, which of course requires an internet connection. but if you want to have offline dictionaries:
- install
dict-gcide
anddict-wn
(or any dictionary package you like). - add your dictionaries to
/etc/dict/dictd.conf
.
example entry for dict-gcide:
database gcide {
data /usr/share/dictd/gcide.dict.dz
index /usr/share/dictd/gcide.index
}
- start dictd:
$ sudo systemctl start dictd.service
- add
server localhost
at the top of/etc/dict/dict.conf
.
now dict will get definitions from the locally running dictd server.