Eclipse Spell Check using the Hunspell Plugin

Overview

This how-to will walk you through installing and and using the hunspell4eclipse plugin.

I use Eclipse IDE for both my Python and restructured Text development and since I’m a lousy speller, I need spell check in my editors. I have not been able to find a plugin in the Eclipse Market Place for a spelling service that works with a Linux workstation. Many years ago I used the Hunspell plugin, but you can no longer install it from the Eclipse Market Place.

After many hours of searching I found this gentleman’s comments from this link hunspell4ecplise “….here is google code archive for hunspell4eclipse https:// code.google.com/archive/p/hunspell4eclipse/”

You will need to create a Custom Hunspell Dictionary if you want to add words. It’s still not 100% but works for what I need, better than nothing.

Check if spelling is enabled

To check if you have a spell service install.

Open eclipse and in the tool bar go to Window–>Preferences in the pop-up window, type spell in the search box then select Spelling.

../_images/eclipse-no-spell.png

It was not on my system.

Install Hunspell

Install Hunspell if you haven’t already.

$ sudo apt update
$ sudo apt install hunspell

Install Hunspell Eclipse Plugin

Go to your Eclipse install’s dropins directory, create a subfolder hunspell download and expand the tar file into that folder.

I install Eclipse in the /opt directory (as I do for all of my out of distribution application) you will need to adjust the commands below to match your install directory.

Note

To list the contents of an archive and not actually expand it use the t option instead of the x option

tar tvfz <filename>

$ cd /opt/eclipse/dropins
$ mkdir hunspell
$ cd hunspell
$ wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/hunspell4eclipse/hunspell4eclipse-8.1-beta-dropin.tar.gz
$ $ tar xvfz hunspell4eclipse-8.1-beta-dropin.tar.gz

Restart Eclipse.

Open eclipse in the tool bar Window–>Preferences type spell in the search box then select Spelling. You should see the option to “Enable spell checking”

../_images/eclipse-spell-enabled.png

Select the dictionary and options you want to use.

You may need to enable spell check in your editors. Some follow the system preferences, others you need to enable spell check in that editors settings.

For Pydev editor no additional settings, but you need to hit CTRL-1 after you select a word to see the word options and use the arrow keys to pick a word.

With ReST editor you need to enable an option in the RsST editor setting, but you only need to hover over the missed spelled word to see the word options.

../_images/ReST-spell.png

I use a custom dictionary, since I want to add words to the dictionary. Here is a document on how to set up a custom dictionary, Custom Hunspell Dictionary.

If anyone has found a better solution please send me an email on what that is. I’m not 100% satisfied with the solution.

….Bill