When I copy source code to a word document or email, it would be nice if spell check could ignore source code token.
Is there an option to ignore blocks of text?
When I copy source code to a word document or email, it would be nice if spell check could ignore source code token.
Is there an option to ignore blocks of text?
This one's easy. Select the code you pasted, go to Tools -> Language (or in the latest version of Word, the equivalent on the ribbon) and select the checkbox "Don't check."
To only turn off spell check for blocks of text, create a style called "Code".
Next, modify the style. In the Style editor, go to the Format sub-menu, then Language, then tick "Do not check spelling or grammar".
Now, wherever you apply that style, Word will ignore spelling and grammar. Perfect for source code! While you're editing the style, set a light-gray background, and set the font to Courier New.
This prevents you from having to set the language (and font, etc.) everywhere you have source code in your Word doc.
The final result looks like this:
Highlight the code/text in the document go to the Tools Menu>Language>Set Language. There will be a "Do not check spelling or grammar" checkbox
this will mark the area so that the spellchecker skips over it
This is my solution to word plastering my design docs with distracting red-underlines. It's not exactly what you're asking for, but you might find it sufficient.
Basically, one day I was thinking - "Why can't word make the mispelling markings SUBTLE like IntelliJ does?"
Well, it can - just change the wavy underline color to light gray instead of red.
http://support.microsoft.com/kb/925597
So much less distracting.
One other thing that the spell checker in IntelliJ does is detect camelcaps and treat each subword in a camel capped word as a separate word... So it considers myWordDocument spelled correctly, but flags myWerdDocument. Be nice if word did that!
To avoid MS Word checking for any spelling or grammar in languages, go to Review> Language> Set proofing language
© 2022 - 2024 — McMap. All rights reserved.