Enable dictionary capabilities within vim.
See it in action:
Add a dictionary functionality to your vim. It requires vim8 and the features +channel
and +python3
.
Example:
:Dictionary noxious
Will give you:
NOXIOUS
Nox"ious, a. Etym: [L. noxius, fr. noxa harm; akin to nocere to harm,
hurt. Cf. Nuisance, Necromancy.]
1. Hurtful; harmful; baneful; pernicious; injurious; destructive;
unwholesome; insalubrious; as, noxious air, food, or climate;
pernicious; corrupting to morals; as, noxious practices or examples.
Too frequent an appearance in places of public resort is noxious to
spiritual promotions. Swift.
2. Guilty; criminal. [R.]
Those who are noxious in the eye of the law. Abp. Bramhall.
Syn.
-- Noisome; hurtful; harmful; injurious; destructive; pernicious;
mischievous; corrupting; baneful; unwholesome; insalubrious. See
Noisome.
-- Nox"ious*ly, adv.
-- Nox"ious*ness, n.
That's it, this is a KISS plugin.
You can check for details here.
-
Vim >= 8.0
+channel
support.+python3
support.
-
python3
itself. -
Optional:
wiktionaryparser
for optional online and multi-lingual support.
Install this plugin with your favorite plugin manager or use vim8's recommended package structure.
See :tab help packages
in vim for details.
cd ~/.vim/pack/foo/start
git clone https://github.com/fmv1992/vim_dictionary
cd vim_dictionary
make install
make install
will:
-
Download Project Gutenberg ebook Webster's Unabridged Dictionary and place it under
./download
. -
Kindly generate helpfiles so you can
:help vim_dictionary
to find out more!
After installing you can check out the available customizations with: :help vim_dictionary-variables
.
Close all your vim instances and execute:
make serve
See the live log. Also see the output file on /tmp/vim_dictionary.log
.
-
This program does not work in cygwin. Something about permission errors when starting the python TCP server:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "./vim_dictionary/vim_dictionary_server.py", line 126, in <module> server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler) File "/usr/lib/python3.6/socketserver.py", line 450, in __init__ self.socket_type) File "/usr/lib/python3.6/socket.py", line 144, in __init__ _socket.socket.__init__(self, family, type, proto, fileno) PermissionError: [Errno 1] Operation not permitted ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and getting sockets in
channel_open()
in vim:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ E898: socket() in channel_open(): Operation not permitted ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After installing see the :help vim_dictionary-next-steps
.
- If
vim
goes to background then one cannot open new instances ofvim
due to probably thepython
program going to the background as well.