I'm a front end developer who's recently started using IntelliJ Idea for JS development. I've found it's a fantastic IDE with some excellent features - the search functions are especially useful.
Unfortunately, with the complexity of our setup I'm getting far too many results in my "Find in Path" and file searches. It's really hitting my productivity - I have to stop every time I do a search and pick carefully through the results to work out which of the many similar paths is the right one. And sev开发者_开发技巧eral times now I've accidentally modified a release version of a file instead of the trunk version. I'm sure people are going to tell me I shouldn't have both in one project, but I've inherited the setup from my predecessor and so far I only have a sketchy idea of how all fits together - Java development and stuff like Maven is an entirely new realm to me. I'm scared if I tinker too much with the project settings my local dev environment is liable to break.
Can anyone tell me if it's possible to configure IntelliJ's indexing or search to only look at certain directories? I know I can set a custom scope, but there doesn't seem to be any way of setting it as a defualt and I don't want to have to select a scope from a dropdown list every time I do a search.
Cheers Fred
The thing is, as you said yourself, you shouldn't have your release files mixed with your trunk (in the IDE at least) and you don't want to change the project configuration.
So having scopes is the best solution you can have right now; maybe not the best way to deal with this problem, but given the conditions I think it's the least time consuming choice.
If you want something more elegant you should try to save your environment configuration (just in case) and do the necessary modifications directly in the way you work. It will probably prevent future problems too.
Anyway, custom scopes will be a lot faster than picking files one by one, even if you have to select it each time you'll do this kind of search.
You can right click on a directory in the Project view, then "Find in Path..." from there. It will only search from that directory and child directories.
Not sure if that solves you issue completely....
精彩评论