Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The built-in spell check feature seems to be running over the whole code, underlining lots of text that is supposed to be that way i.e. the code itself.

Any way to limit it to just comments (//)?

share|improve this question
    
There's this, but I've no time to dig into it: "spelling_selector": "markup.raw, source string.quoted - punctuation - meta.preprocessor.c.include, source comment - source comment.block.preprocessor, -(source, constant, keyword, storage, support, variable, markup.underline.link, meta.tag)", – user418150 Jun 3 '15 at 11:55
    
I don'tk know about Sublime 2 but Sublime 3 does it out of the box. The settings "spelling_selector", allow to control which scopes are checked. – gzou Sep 15 '15 at 14:00
up vote 11 down vote accepted

There is no direct way of limiting the spell checking parser to only comments in Sublime Text 2 (but this is simple to do in Sublime Text 3). These programs are not written to differentiate text document and some code syntax. So most of the code syntax looks like spelling errors. The best solution is to toggle spell-check with F6 and right-click on the spelling error to change the spelling. Or use Ctrl+F6 to move to next misspelling and change it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.