Iâve updated the Github repo; the package now runs the check in a background process, eliminating the need to do it manually, and allows words to be ignored and learned. Once the new region-drawing keys are implemented, it should prove itself to be a totally viable replacement for Sublimeâs built-in spell-checker.
ST2 & 3, OSX: CheckBounce, a spell-check plugin
Thanks! I think so, too, especially since it irritatingly picks up on LaTeX keywords as errors. However, thereâs also a handy dandy language-sensitive word count included now, which might rival the ignore/learn thing for usefulness.
In other news, it now has been tested under ST2 and ST3 and runs smoothly with both (after some backwards-porting).
Hi,
Iâm very interested by this plugin but I can not find it in the âpackage control : install packagesâ list ⌠so, stupid question : how can I install it ?
[quote=âGerardLambertâ]Hi,
Iâm very interested by this plugin but I can not find it in the âpackage control : install packagesâ list ⌠so, stupid question : how can I install it ?[/quote]
You can either clone it from the Github repository into your Sublime packages directory or use the ââZIPâ link to download it as a zip file. If you download the zip, be sure to rename the folder thatâs extracted from âCheckBounce-masterâ to âCheckBounceâ before dropping it in with your packages.
thanks for your answer ! I installed it and now I have probably other stupid questions
I have an unknown word and when I right click on it, I still have the suggestions for the default SpellCheking plus the classic âignore XXXXâ but I know also have three more options
âIgnore Wordâ
âAdd Word to dictionnaryâ
âsuggest correctionsâ
I click on âAdd Word to dictionnayâ (that is the main reason I want to try your package) but nothing happens : the word stay underlined ⌠Did I do something wrong ?
thanks
[quote=âGerardLambertâ]thanks for your answer ! I installed it and now I have probably other stupid questions
I have an unknown word and when I right click on it, I still have the suggestions for the default SpellCheking plus the classic âignore XXXXâ but I know also have three more options
âIgnore Wordâ
âAdd Word to dictionnaryâ
âsuggest correctionsâ
I click on âAdd Word to dictionnayâ (that is the main reason I want to try your package) but nothing happens : the word stay underlined ⌠Did I do something wrong ?
thanks[/quote]
Hi there,
Sorry it took me a while to see this. In the last version, the underline stays there until you edit the document again. Just keep typing after you add a word to the dictionary and it should disappear from all over the file. (And everywhere else in OS X: âLearnâ uses the global spelling dictionary, whereas âIgnoreâ is document- and session-specific.) Iâm almost done with a new version thatâs much less of a resource hog and includes some nifty new features; hopefully Iâll be able to fix that kludge as well.
[quote=âGerardLambertâ]thanks for your answer ! I installed it and now I have probably other stupid questions
I have an unknown word and when I right click on it, I still have the suggestions for the default SpellCheking plus the classic âignore XXXXâ but I know also have three more options
âIgnore Wordâ
âAdd Word to dictionnaryâ
âsuggest correctionsâ
I click on âAdd Word to dictionnayâ (that is the main reason I want to try your package) but nothing happens : the word stay underlined ⌠Did I do something wrong ?
thanks[/quote]
Just pushed to Github a new version thatâs faster, less of a resource hog, and able to refresh itself after a word is added or ignored so that the error disappears immediately. Itâs fully compatible with ST2 and ST3 as of the evening of April 5th.
Hi! I have a question. When I place the renamed CheckBounce folder in Packages, nothing really happens. I have the settings under Preferences added, and to be sure I copied the CheckBounce.sublime-settings content into the user specific settings file. Iâm on Sublime Text 2. If I have the ST2 spell-check disabled, absolutely nothing happens (I have tried writing the weirdest wordsâŚ) and with ST2 spell check on no other options are available when I right-click the words. Any idea whatâs wrong? Thanks in advance!
âWhen I place the renamed CheckBounce folder in Packagesâ implies that there is already another CheckBounce folder with a different name. Hopefully, you just have one (1) CheckBounce folder. Obviously, you would not want more than one version of the same plugin running simultaneously. As long as the CheckBounce folder is in the Packages directory, you can call the folder âholeneâ instead of CheckBounce if you want to. When the Sublime Text application opens, check the python panel shell console to see if there are any errors loading any plugins â if everything is okay, you should see the python plugins from CheckBounce loading on startup without any issues reported. Do that, and then report back.
The reference to the renamed CheckBounce folder was that you instruction to remove the â-masterâ part of the name in âREADME.mdownâ
Anyhow; the output from the console on start-up seems legit to me:
theme loaded
app ready
pre session restore time: 0.562632
using gamma: 2 (err: 6.9282)
Loading dictionary Packages/Language - English/en_GB.dic
wrote startup cache, added files: 58 orphaned files: 0 total files: 167 cache hits: 109
startup time: 1.286 (package setup was not run)
loaded 860 snippets
Package Control: No updated packages
But I still lack spell check unless I turn on (F6) the internal ST2 spell check (which of course is what we donât want) âŚ
There are a couple of things you may want to try. First off, Iâd recommend updating to the latest commit, which I pushed about an hour ago; it adds (optional) grammar checking and makes it easier to turn the package on and off in individual views (see the updated README for more info). Next, make sure youâre trying to use either one of the built-in whitelisted syntaxesâLaTeX, Markdown, and Plain Textâor one that youâve added to the settings yourself. If youâve added a new syntax on your own, be aware that you want it to match the scope selector, not the name of the .tmLanguage file.
The most likely cause is that I published a revision-in-progress to Github too early and you happened to get a buggy editionâa terrible habit of mine. Iâve tested the version thatâs now on Github in both ST2 and ST3 for at least a solid hour or two each, and havenât encountered any problems. So you may want to see if you have better luck with this commit. Sorry for the inconvenience, though, and please let me know if you continue to encounter trouble.
Hey again!
Iâm testing in LaTeX, Markdown, Text and tried to add âMATLABâ (âmatlabâ and âsource.matlabâ, what does define scope selector for the different languages?) as well, without much success. I downloaded the new latest commit, and added to Packages. The python console output is reporting some errors:
Reloading plugin /Users/holene/Library/Application Support/Sublime Text 2/Packages/CheckBounce/act_on_word.py
Traceback (most recent call last):
File "./sublime_plugin.py", line 62, in reload_plugin
File "./act_on_word.py", line 8, in <module>
from spellchecker import SpellChecker
File "./spellchecker.py", line 179
sublime.status_message('Learned "{0}."'.format(word))
^
IndentationError: unexpected indent
Reloading plugin /Users/holene/Library/Application Support/Sublime Text 2/Packages/CheckBounce/autocorrect_listener.py
Traceback (most recent call last):
File "./sublime_plugin.py", line 62, in reload_plugin
File "./autocorrect_listener.py", line 10, in <module>
from spellchecker import SpellChecker
File "./spellchecker.py", line 179
sublime.status_message('Learned "{0}."'.format(word))
^
IndentationError: unexpected indent
Reloading plugin /Users/holene/Library/Application Support/Sublime Text 2/Packages/CheckBounce/background.py
Traceback (most recent call last):
File "./sublime_plugin.py", line 62, in reload_plugin
File "./background.py", line 14, in <module>
from spellchecker import SpellChecker
File "./spellchecker.py", line 179
sublime.status_message('Learned "{0}."'.format(word))
^
IndentationError: unexpected indent
Reloading plugin /Users/holene/Library/Application Support/Sublime Text 2/Packages/CheckBounce/check_contextual.py
Reloading plugin /Users/holene/Library/Application Support/Sublime Text 2/Packages/CheckBounce/const.py
Reloading plugin /Users/holene/Library/Application Support/Sublime Text 2/Packages/CheckBounce/spellchecker.py
Traceback (most recent call last):
File "./sublime_plugin.py", line 62, in reload_plugin
File "./spellchecker.py", line 179
sublime.status_message('Learned "{0}."'.format(word))
^
IndentationError: unexpected indent
found 10 files for base name Default.sublime-keymap
found 33 files for base name Main.sublime-menu
Strange thing about that is, thatâs not whatâs on line 179. Iâd recommend, just to be certain, that you quit Sublime, delete the whole âPackages/CheckBounceâ folder, copy in the Github version, the restart Sublime, just to be certain none of the compiled Python files ST2 generates are lingering behind and confusing it. I just did this with my copy of ST2, after double-checking that the code on Github was up-to-date and uncorrupted (as of the commit from 7 hours ago), and it seemed to run okay. Let me know if that works any better!
thanks for the answer I updated to the new version ⌠I still have questions âŚ
-
Do I need to switch off the default spell tools ? Iâm using ST2 and when a word is unknown I have a red underline under it AND a red box around it ⌠when I do âadd word to dictionaryâ only the red box disappears (not the red underline).
-
can I change the dictionary (for the default spell I have 3 : en_GB, en_US and french) ? when I do so Iâm not sure to really understand what happens with your package but it does not seem to work we;;
-
I do not manage to toggle of the spell cheking by CheckBounce (I did it through the palette but the red boxes are staying ⌠even when I edit the document etcâŚ)
[quote]Traceback (most recent call last):
File â./spelling_background.pyâ, line 103, in
File â./spelling_background.pyâ, line 93, in reassign
File â./spellchecker.pyâ, line 71, in remove
AttributeError: âNoneTypeâ object has no attribute âclearâ
Traceback (most recent call last):
File â./spelling_background.pyâ, line 103, in
File â./spelling_background.pyâ, line 93, in reassign
File â./spellchecker.pyâ, line 71, in remove
AttributeError: âNoneTypeâ object has no attribute âclearâ[/quote]
-
If I did âadd word to dictionaryâ by mistake, can I reverse it and suppress the word from the dictionary ? related: where are the added words saved ?
-
small remark: when I right click on a bad word , If the cursor is not on the word your package does not work (but the default spell does 0 : I can to ignore word but not add word to dictionary ⌠I first have to click on it then I can right click âŚ
To take your questions in order:
-
This package does not integrate with Sublimeâs built-in spell-checker, so youâll get the best results if you only use one at a time. I donât have any plans to do anything as elaborate as modify Sublimeâs dictionary files based on the spelling results from CheckBounce.
-
Again, no integration with the built-in checker, so changing the dictionary files Sublime looks at wonât do anything for this package. OS Xâs built-in spelling system is designed to automatically identify a documentâs dominant language, however, and it seemed to work reasonably well in the limited testing I did, picking up onâand suggesting corrections forâGerman and French.
-
Iâll look into this later today and post an update to Github tonight.
-
OS X stores its learned words in ~/Library/Spelling, I believe, and I think you can edit the file thatâs there if you really want to. Though Iâve never tried.
-
Since I donât think thereâs a way to capture mouse-down events, I think this is just how Sublime has to work.
[quote=âGerardLambertâ]thanks for the answer I updated to the new version ⌠I still have questions âŚ
[/quote]
Iâve just pushed an updated version that should address your problem with toggling the checker on and off. Give it a shot and let me know how it works.
I downloaded the new update, and it now works! Thanks =)
Is there an exception-file for language syntax, or may I make one? For instance when you write LaTeX you wouldnât want the spellcheck to react to \textsc etc.
It is not syntax specific, but is easy to edit:
/Users/HOME/Library/Spelling/LocalDictionary