Home Download Buy Blog Forum Support

ST2 & 3, OSX: CheckBounce, a spell-check plugin

Re: ST2 & 3, OSX: CheckBounce, a spell-check plugin

Postby holene on Sat Apr 06, 2013 8:03 pm

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!
holene
 
Posts: 17
Joined: Mon Jun 25, 2012 8:33 am

Re: ST2 & 3, OSX: CheckBounce, a spell-check plugin

Postby lawlist on Sun Apr 07, 2013 6:07 am

"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.
lawlist
 
Posts: 54
Joined: Thu Feb 21, 2013 6:47 pm

Re: ST2 & 3, OSX: CheckBounce, a spell-check plugin

Postby holene on Sun Apr 07, 2013 7:17 am

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:
Code: Select all
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) ...
holene
 
Posts: 17
Joined: Mon Jun 25, 2012 8:33 am

Re: ST2 & 3, OSX: CheckBounce, a spell-check plugin

Postby phyllisstein on Sun Apr 07, 2013 12:37 pm

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.
phyllisstein
 
Posts: 48
Joined: Fri Aug 24, 2012 5:28 am

Re: ST2 & 3, OSX: CheckBounce, a spell-check plugin

Postby holene on Sun Apr 07, 2013 2:57 pm

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:

Code: Select all
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
holene
 
Posts: 17
Joined: Mon Jun 25, 2012 8:33 am

Re: ST2 & 3, OSX: CheckBounce, a spell-check plugin

Postby phyllisstein on Sun Apr 07, 2013 9:12 pm

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!
phyllisstein
 
Posts: 48
Joined: Fri Aug 24, 2012 5:28 am

Re: ST2 & 3, OSX: CheckBounce, a spell-check plugin

Postby GerardLambert on Mon Apr 08, 2013 9:41 am

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....)
Traceback (most recent call last):
File "./spelling_background.py", line 103, in <lambda>
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 <lambda>
File "./spelling_background.py", line 93, in reassign
File "./spellchecker.py", line 71, in remove
AttributeError: 'NoneType' object has no attribute 'clear'

* 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 ...
GerardLambert
 
Posts: 18
Joined: Thu Aug 30, 2012 9:54 am

Re: ST2 & 3, OSX: CheckBounce, a spell-check plugin

Postby phyllisstein on Mon Apr 08, 2013 6:02 pm

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.
phyllisstein
 
Posts: 48
Joined: Fri Aug 24, 2012 5:28 am

Re: ST2 & 3, OSX: CheckBounce, a spell-check plugin

Postby phyllisstein on Mon Apr 08, 2013 9:31 pm

GerardLambert wrote:thanks for the answer I updated to the new version ... I still have questions ....


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.
phyllisstein
 
Posts: 48
Joined: Fri Aug 24, 2012 5:28 am

Re: ST2 & 3, OSX: CheckBounce, a spell-check plugin

Postby holene on Thu Apr 11, 2013 11:53 am

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.
holene
 
Posts: 17
Joined: Mon Jun 25, 2012 8:33 am

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: Exabot [Bot] and 9 guests