eclipse 如何在eclipse中创建用户字典?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23237111/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 21:40:42  来源:igfitidea点击:

How to create a user dictionary in eclipse?

eclipsedictionaryeclipse-cdtspell-checking

提问by MozenRath

When I use eclipse and see my name in the javadocs as the author, I also find the spellchecker marking my name as it does not understand that it is a proper name. Thus, I get the option of:

当我使用 eclipse 并在 javadocs 中看到我的名字作为作者时,我还发现拼写检查器标记了我的名字,因为它不知道这是一个正确的名字。因此,我可以选择:

Add {word} to dictionary

Add {word} to dictionary

but when I click on it, It says the user dictionary is missing and asks if I would like to create a new one. When I say yes, it just shows the spell checking preferences with a blank user dictionary field where I have the option to only add an existing user dictionary and no option to create a new one.

但是当我点击它时,它说缺少用户词典并询问我是否要创建一个新词典。当我说是时,它只显示带有空白用户词典字段的拼写检查首选项,我可以选择仅添加现有用户词典,而不能选择创建新词典。

How do I create the user dictionary so that I can configure it for use in eclipse?

如何创建用户字典以便我可以配置它以在 Eclipse 中使用?

采纳答案by DonyorM

Yes, you can.

是的你可以。

Create a text (.txt) file in a directory on your computer. Your eclipse workspace may be appropriate. Add a new word on each line of text. You don't have to remember every word, that's what the help option is for, when you type a misspelling/a word eclipse doesn't know.

在计算机上的目录中创建一个文本 (.txt) 文件。您的 eclipse 工作区可能是合适的。在每行文本上添加一个新单词。当您输入拼写错误/eclipse 不知道的单词时,您不必记住每个单词,这就是帮助选项的用途。

Go to Window → Preferences → General → Editors → Text Editors → Spelling and find the User defined dictionary section. To the right of that is a button called "Browse" click it, navigate to your text file, and choose it. You'll need to restart Eclipse in order for the changes to take effect.

转到窗口 → 首选项 → 常规 → 编辑器 → 文本编辑器 → 拼写并找到用户定义的字典部分。在它的右侧是一个名为“浏览”的按钮,单击它,导航到您的文本文件,然后选择它。您需要重新启动 Eclipse 以使更改生效。

You can also just type in the text box next to "User defined dictionary" in the Spelling Menu the path to where you wantthe file to be, it doesn't have to exist. But you must be familiar with paths if you want to do this.

您也可以在拼写菜单中“用户定义的字典”旁边的文本框中输入您希望文件所在的路径,它不必存在。但是如果你想这样做,你必须熟悉路径。

回答by Adam Caviness

When in C/C++, you must change the "Select spelling engine to use:" option at the top of that options page to be "C/C++ spelling engine".

在 C/C++ 中,您必须将该选项页面顶部的“选择要使用的拼写引擎:”选项更改为“C/C++ 拼写引擎”。

enter image description here

在此处输入图片说明

回答by greg-449

The user dictionary is just a plain text file with one word per line.

用户词典只是一个每行一个单词的纯文本文件。

You do not have to create this file, just put the path to where you want to store the file in the 'User defined dictionary' configuration that Eclipse shows you and it will create the file.

您不必创建此文件,只需在 Eclipse 向您显示的“用户定义的字典”配置中放置要存储文件的路径,它就会创建该文件。

回答by Rob

Another thing to watch out for, at least in Eclipse Kepler, is that the dictionary cannot be located in C:\ProgramFiles\eclipse. I could not add words to the dictionary when I put the file there, maybe because it doesn't have permission to that directory.

至少在 Eclipse Kepler 中需要注意的另一件事是字典不能位于C:\ProgramFiles\eclipse. 当我将文件放在那里时,我无法在字典中添加单词,可能是因为它没有对该目录的权限。