I mean Cmd + comma, and not Cmd + plus. Sorry for misunderstanding my explanation and I had to clarify it.
Q: Is is possible to deactivate the spellcheck for Japanese lines?
Press Cmd + comma or go to Sublime Text > Preference > Settings, see how it is:
{
"color_scheme": "Packages/star-wars-syntax/an-old-hope.tmTheme",
"dictionary": "Packages/Language - English/en_GB.dic",
"font_size": 18,
"ignored_packages":
[
"Edit Preferences",
"JavaScript",
"Vintage"
],
"skin": "DA UI/Elegant",
"theme": "DA.sublime-theme"
}
Replace ``“dictionary”: “Packages/Language - English/en_GB.dic”,for
“dictionary”: “Packages/Language - English/en_GB.dic”, Packages/Language - French/fr.dic", Packages/Language - Japanese/ja.dic"```.
Thank you gusbemacbe, now I understand.
Any idea where I can download the ja.dic file from?
There is no ja.dic in internet.
I hacked and extracted the Japanese dictionary from Google Japanese keyboard and built myself it. I didn’t build Japanese grammar (.aff) yet. Here is the shared file: (I removed the shared file)
After downloading, please advice me, so I will remove the link, because the dictionary is in beta.
Thanks a lot gusbemacbe, I downloaded the file.
Now I have to understand the last step : where to paste the dic file in Sublime Text…
Is there a better way to turn off spell check for Japanese characters?
Sorry, I went to bed and I didn’t notice you have sent earlier.
If you use macOS, go to Finder, press Cmd + Shift + G and copy and paste /Users/yourname/Library/Application Support/Sublime Text 3/Packages/User
, and create new folder folder and rename it as Dictionaries or Dictionary. Copy the ja.dict to this folder. Restart Sublime Text.
If you use Linux, go to /homeyourname/.config/sublime-text-3/Packages/User
.
If you use Windows, go to %APPDATA%\Sublime Text 3
or C:\Users\%yourname%\AppData\Roaming\Sublime Text 3\Packages (equals %appdata%\Sublime Text 2\Packages
.
Ad follow the same steps.
Thanks you gusbemacbe,
I figured it out by myself yesterday, but it makes ST crash every time I add the dic file.
I finally installed the Desktop version of LanguageTool, and will see what I can do with it.
Thanks again for your help.
If LanguageTool installed the dictionaries and created the folder of dictionaries, check its folder at /Users/yourname/Library/Application Support/Sublime Text 3/Packages/
.
If it doesn’t work, you need to hack and merge the English dictionary.
The English dictionary isn’t listed in that package, because it is inside Sublime Text3.app
Backup Sublime Text 3.app before.
Go to Finder, press Cmd + Shift + G and copy and paste /yourname/Applications/Sublime Text.app/Contents/MacOS/Packages/Language - English.sublime-package
Do not open the file Language - English.sublime-package
with Sublime Text, but with TextEdit or Atom, and also open the ja.dict
with Atom or TextEdit, copy everything from the file ja.dict
and paste on the end of the file Language - English.sublime-package
. Save it and open the app. Test two sentences in English and Japanese, and see if it works.
If it doesn’t work, restart to the backup of Sublime Text3.app, search at Package Control: Install Package and type “French”, you will install the French dictionary which will appear in the packages folder of Sublime Text and copy the ja.dict to the folder of French dictionary.
Hi,
That’s the problem: I don’t have any Language folder in …/Applications/Sublime Text.app/Contents/MacOS/Packages/.
Though I do have access to the English and French dics in ST.
I think a simpler solution based on your file layout would be to write a syntax definition to scope alternate lines differently, so you can update your spelling selector preference to ignore the Japanese lines
Is there a better way to turn off spell check for Japanese characters?
gusbemacbe:And did it work for you, Higashi?
No. I meant that I have access (I can use) the English and French dics, but I cannot find them in …/Applications/Sublime Text.app/Contents/MacOS/Packages/.
kingkeith: a simpler solution based on your file layout would be to write a syntax definition to scope alternate lines differently…
I have no idea how to to this. I also thought that I could find a way to spellcheck only the line where the cursor is, but still, I don’t know how to do. That would be a quite efficient solution…
Got it!
Inspired by kingkeith, I selected C in View - Syntax.
Then all I have to do is to start the French line with //, all the other lines are ignored by the spellcheck.
Thank you to both of you
I’m just a translator, not a programmer, so I’m not sure to understand.
If you’re just asking if the Japanese sentence is ignored by the spellcheck after print(… yes it is.
The only problem I noticed until now is with this character: ’
Everything after this character will be checked by the spellcheck. Not really a problem, since it’s not really used in Japanese.
No, I don’t mean print. I just mean this:
Every sentence that starts with // is ignored by the spellcheck. But if that sentence contains a straight apostrophe (’), the spellcheck reactivates for all the words following this apostrophe.
(Remember that I’m talking about the spellcheck behavior with View - Syntax: C, where comments are ignored by the spellcheck).
Sorry to reopen an old topic…
As I wrote above, I can use the C syntax to have the spell check activited only for the lines that start with “//”.
But since I’m now using Plaintasks daily, I would like to import this spell check setting (the one for the C syntax) to PlainTasks. Any idea how I could achieve that?
Create a new Plain Text syntax for your text files formats: https://www.sublimetext.com/docs/3/syntax.html
Here it is a simple example:
%YAML 1.2
---
name: Rich Text
file_extensions:
- txt
scope: rich.text
contexts:
main:
- match: '(//).+'
scope: text.plain.rich.text
captures:
1: punctuation.definition.comment.rich.text