Is it possible to have a per project dictionary that is not user specific?
I assume the answer to the question is "Not", but I thought I'd ask anyway. I've looked and I can't see any option to do this. I briefly played with the options to see if I could put a dictionary file in the .idea directry of the project, but not only did that not work as expected (adding words don't go to such a dictionary), but now added words don't seem to be going into the user specific XML files either. It still seems to remember when I've added them but adding new words doesnt change those files.
In any case, lets assume the following situation is at play:
- There are several large web project that we're using WebStorm for
- There are a few developers on each project
- Naturally, all of the developers have their own installs and their own usernames
- Due to the nature of the projects, each of them has their own list of words which are not standard words but are domain specific Jargon words.
- When working on Project A, we would like word list A to be a list of accepted words
- When working on Project B, we would like word list B to be a list of accepted words
- Project A and Project B are for completely different clients, and as such we do not want to use these domain specific words used by client A in a page used by client B, as that would cause confusion. However these errors are semi-frequent when hopping between projects for quick edits.
I can't see any way to set some sort of project specific list of accepted words in anything resembling a sane fashion.
- There are X developers.
- Developer X - 3 adds a word to the accepted word list, which modifies .idea/dictionaries/developerX3.xml
- Project is checked into source control
- Everyone else checks out said project and start getting warnings showing up about spelling errors
- Everyone else spends a bunch of time having to add words that have already been accepted to their own dictionaries OR try to collate the list of accepted words from all of the other user dictionaries, which is a pain in the you know what because theyre XML files and thus crufted up with tags
This is also exceedingly annoying as a single user that is moving from one platform to another with the same project. On this linux machine my username is tmartin, but on the windows machines my username is Terence. I have no control over either one. So even on my own I end up kicking myself in the crotch with newly added words.
I was going to try jut symlinking the files to each other but I don't know how well that carries over to Windows, and it doesn't help in the situation of a new developer or an existing developer with a slight username change.
请先登录再写评论。
Hi there,
I doubt it will work. IDE seems to delete original file (symlink in your case) and then creates it again. At very least it did not worked for me when I have tried symlinks for config files (Windows 7).
-----
In any case -- I do not see what the problem is (possibly I'm just misreading the post/problem here).
Let me describe my setup first:
I'm quite often working on some project at work and then doing small things at home the same day later.
If I add some word to the spell checker's accepted (ignored) list at work it will then be ignored at home as well -- I have no need to add it 2nd time or merge individual dictionaries into one. Same true for other way around.
Considering the aforementioned info .. I just went and did this simple experiment:
Based on the above I can state that you CAN have some project-specific dictionary that will not belong to any particular user.
But because of the last part ... you will have to add new words there manually. If that's what you want to avoid and be able for all users to contribute to the same dictionary automatically (rather than to their own) .. then yes -- it will not be suitable for you as it will not resolve the main issue (having per user dictionaries instead of one for all).
Attachment(s):
Project1.xml
Hmm, that's interesting because it sounds like all of the user specific dictionaries in the project should all be used regardless of the user. That's not true in my case, unfortunately. I have the same project here on Windows 7 (username Terence) and on my linux machine (username tmartin) and in the past every time I added a word or words to the dictionary, checked in the project and switched machines, I would have to add it on the other machine as well. Currently both XML files are identical for this reason (I haven't manually cross merged them for this project). I've had the same problem with IntelliJ for years now, which I assume uses the same plugin.
However, all that being said there's something bigger at play here, and perhaps it's actually doing something project specific, just not in a way that persists with the actual project.
As a test, I modified the Terence.xml file to have only 5 words in it instead of the 27 that tmartin.xml has in it. Then I entered the word "HSVF" (actually it's an acronym) and it was identified as misspelled. I told it to add the word, and now it accepts it.
Here's the odd thing: Terence.xml is not modified at all, it still has the 5 words. Settings->Editor->Spelling->Accepted Words shows 6 words; the 5 that are in Terence.xml and "hsvf". According to git, no files in the directory are changed at all, and the only file being excluded is .idea/workspace.xml, which does not contain the text "hsvf".
I can close and re-open the project or quit and restart WebStorm and it still accepts the word. The settings dialog says that the accepted words are "for current project".
I take this to mean that a project specific dictionary is actually possible, although why it suddenly started putting the words in some magic location and not in username.xml is unknown to me. It's also not very useful if the project specific directory is not carried with the project. However I have the same issue with project specific version control settings not being carried along in the project files either, which is by design, so this does not surprise me.
In any case, thank you for the help!
I want this too. Lots of things in PyCharm have a "share" option, e.g., Inspection Scopes. That's great because anybody working on the project should likely be using the same scope, or at least have the option to do so and easily. I see spelling dictionaries as being no different. Each project has domain specific terminology (perhaps just oddly abbreviated variable names). It's a waste of time and error prone to have each developer build an appropriate dictionary, all to wind up at the (hopefully) same effective result.
See also https://youtrack.jetbrains.com/issue/IDEA-50997
Please vote/comment https://youtrack.jetbrains.com/issue/IDEA-121886 on this matter.
The issue to vote on is https://youtrack.jetbrains.com/issue/WI-41127