简体   繁体   English

OSX上的Sublime Text:拼写检查器无法学习

[英]Sublime Text on OSX: Spell checker does not learn

I'm trying to get the/a spell checker working for ST2 on OSX (10.6.8 and 10.8.5). 我正试图在OSX(10.6.8和10.8.5)上使用/拼写检查器为ST2工作。 The build-in solution does a pretty good job, especially for LaTeX files. 内置解决方案做得非常好,特别是对于LaTeX文件。 I do see words underlined in red, if ST2 thinks they contain a typo. 如果ST2认为它们包含拼写错误,我确实看到用红色加下划线的单词。 But if I choose to "ignore" these words (no more highlighting then) and restart Sublime Text, they're highlighted again (same thing happens with ST3). 但是如果我选择“忽略”这些词(不再突出显示)并重新启动Sublime Text,它们会再次突出显示(ST3也会发生同样的事情)。

I'm not even able to find the list of ignored words and I somehow get the impression that ST seems to "forget" those words. 我甚至无法找到被忽略的单词列表,我不知何故得到ST似乎“忘记”这些单词的印象。 I've tried to add a list manually in my Preference.sublime-settings file: no effect. 我试图在我的Preference.sublime-settings文件中手动添加列表:没有效果。

The "CheckBounce" plugin looks like a promising alternative, although LaTeX support is missing (most commands are highlighted as incorrect). “CheckBounce”插件看起来是一个很有前途的替代方案,虽然缺少LaTeX支持(大多数命令都突出显示为不正确)。

Any ideas? 有任何想法吗?

See the section for ignored_words below. 请参阅下面的ignored_words部分。 You need to manually add words to your preferences file. 您需要手动将文字添加到首选项文件中。 I've set the preferences files to hot-keys to have easy access. 我已将首选项文件设置为热键以便于访问。

/Users/HOME/Library/Application Support/Sublime Text 2/Packages/User/Preferences.sublime-settings / Users / HOME / Library / Application Support / Sublime Text 2 / Packages / User / Preferences.sublime-settings

{
    "auto_complete_triggers":
    [
        {
            "characters": "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?",
            "selector": "text.shtml"
        }
    ],
    "color_scheme": "Packages/User/lawlist.tmTheme",
    "find_selected_text": false,
    "font_face": "Courier",
    "font_size": 18.0,
    "forward_sync": true,
    "ignored_packages":
    [
        "Vintage"
    ],
    "ignored_words":
    [
        "Joinder",
        "\\bf\\uline",
        "\\begin{singlespace*}",
        "\\end{singlespace*}",
        "\\begin{tightcenter}",
        "\\end{tightcenter}",
        "\\begin{document}",
        "\\end{document}",
        "quotingsetup",
        "renewenvironment",
        "doublespace",
        "flushright",
        "minipage",
        "pagestyle",
        "uuline",
        "textbf"
    ],
    "inverse_cursor_state": true,
    "keep_focus": false,
    "scroll_past_end": true,
    "show_full_path": true,
    "word_separators": "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?"
}

It seems like the ignore_word command in your sublime does not add the word to the ignored_words list. 似乎sublime中的ignore_word命令不会将该单词添加到ignored_words列表中。 I am currently using ST3 and it has the same problem. 我目前正在使用ST3,它也有同样的问题。 So I made a small plugin to make the context command ignore xxxxx adds a word to the ignored_words list in your user's preferences.sublime-settings . 所以我制作了一个小插件来使上下文命令ignore xxxxx在用户的preferences.sublime-settingsignored_words列表中添加一个单词。

Here is the repository: https://github.com/zcold/ignore_words 这是存储库: https//github.com/zcold/ignore_words

  • If you are using package control, just add a new repository and install the plugin named ignore_words . 如果您使用的是程序包控制,只需添加一个新的存储库并安装名为ignore_words的插件。
  • If you do not use package control, just create a ignore_words folder in ${sublime}\\data\\packages\\ and copy the file ignoreword.py from the mentioned repository into that folder. 如果您不使用包控件,只需在${sublime}\\data\\packages\\创建一个ignore_words文件夹,并将文件ignoreword.py从提到的存储库复制到该文件夹​​中。

I hope it solves your problem. 我希望它能解决你的问题。

One way to solve this, is add the word by hand to the dictionary. 解决这个问题的一种方法是手工将字添加到字典中。 Locate the .dic file, in there you will see a big list of words with the follow format word/p [CAT=,G=,N=] Those things after the word are features of the word (eg proper name ,feminine,...) Find a similar word and copy that part to your entry. 找到.dic文件,在那里你会看到一个大的单词列表,其中包含以下格式word/p [CAT=,G=,N=]这些单词后面的单词是这个单词的特征(例如专有名称,女性, ...)找到一个类似的单词并将该部分复制到您的条目中。 Save the file, restart your editor (to reload the dictionary) and you should be good to go :) 保存文件,重新启动编辑器(重新加载字典),你应该好好去:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM