Last Updated: February 25, 2016
·
835
· kazark

Google search a word before adding it to a Vim spell file

Sometimes I'm working in Vim with spell-checking turned on and type a word Vim does not recognize. At that point I tend to second-guess myself about whether I've spelled it correctly.

Vim does not recognize it

With the vim-g plugin, I can easily Google search the word under the cursor to double-check myself with the :G command:

But Google does!

Confidence restored, I can add the word to the spell file with the zg command so Vim will recognize it in the future.

Recognized by Vim now

Caveat: this plugin does not work on Windows as of this writing. I have filed an issue on its GitHub page. Update: I submitted a pull request to support Windows, which has been merged.