Reputation: 6949
I’ve noticed that Sublime Text 3 seems to ignore CAPITALISED words when using the spell checker.
Quite a lot of my document has strings in caps. I don’t want to mess with the formatting, just check the spelling.
Is there a file I can modify to toggle spell check where capitals are involved in SublimeText3?
I realise this may get thrown out for not being a coding question but I'll show you a Venn diagram of those who use SO and those who know how to really use Sublime Text.
Upvotes: 0
Views: 117
Reputation: 102842
The answer is yes, you can spell-check words in all caps, but it's going to take some effort. There is a setting that is appropriate here:
// Word list to use for spell checking. May also be a list of dictionaries.
"dictionary": "Packages/Language - English/en_US.dic",
The included dictionaries (there is one for en_US
and one for en_GB
) include some words in all caps, such as AIDS and DNA, but not all, so you'll need to make your own .dic
file. Fortunately, this is fairly straightforward. You'll need to extract the original file, convert it to upper case in Sublime, save it, then change your settings to point to both dictionaries.
To extract the dictionary package, install PackageResourceViewer
from Package Control. Open the Command Palette with CtrlShiftP (⌘ShiftP on macOS), type in prv
, make sure PackageResourceViewer: Extract Package
is selected, and hit Enter. Next, select the Language - English
package, hit Enter, then hit Enter again when it shows Start Extraction (1 of XX items selected)
. A little popup should come up telling you the package was extracted successfully.
Next, you'll need to navigate to the correct folder and open the dictionary file in Sublime. Select Preferences → Browse Packages…
(macOS: :Sublime Text → Preferences → Browse Packages…
) to open the Packages
directory in your file manager:
~/.config/sublime-text-3/Packages
or ~/.config/sublime-text/Packages
~/Library/Application Support/Sublime Text 3/Packages
or ~/Library/Application Support/Sublime Text/Packages
C:\Users\YourUserName\AppData\Roaming\Sublime Text 3\Packages
or C:\Users\YourUserName\AppData\Roaming\Sublime Text\Packages
InstallationFolder\Sublime Text 3\Data\Packages
or InstallationFolder\Sublime Text\Data\Packages
The exact path depends on version and whether or not you upgraded from Sublime Text 3.
Once in Packages
, navigate into the Language - English
directory and open either en_US.dic
or en_GB.dic
(depending on your locale and preference) in Sublime. Hit CtrlA (macOS: ⌘A) to Select All. Next, select Edit → Convert Case → Upper Case
and all letters will be capitalized. Finally, select File → Save As…
. Navigate up one level from Language - English
to Packages
, then go into the User
directory and save the file there as en_US_CAPS.dic
or en_GB_CAPS.dic
, depending on which original you opened.
Finally, select Preferences → Settings
and add the following to your user settings on the right side:
"dictionary": ["Packages/Language - English/en_US.dic", "Packages/User/en_US_CAPS.dic"],
Change both occurrences of US
to GB
if that's what you're using. Save, and you should be all set.
If you want to clean up a little at the end, you can delete the Packages/Language - English
folder that was created earlier, but things should be just fine if you don't.
Upvotes: 2