ok I search for say
eval() in a php project to find leaks.
I get 60 hits. I look at the first result and want to see if this is maybe a security leak. I see eval() gets called like this eval($mySpecialVar) I then search for $mySpecialVar I see it is not security problem. Now I want to check the next entry of the eval() search result... but it is not there any more. I have now to search again for eval() from the very very beginning, and figure out where I was with the 60 results....?!?
is there no more clever way to do it?
EDIT
the open in new tab is grayed out for me
You have to check "Open in new tab" setting. Its location depends on what search you're using - if it is a text find, the setting is under Result Options section:
If you're searching for usages, it is in Edit > Find > Find Usages Settings:
Note that this option is enabled only if you already have some search results displayed. So in your case: you first search for eval(), then before searching for $mySpecialVar you're clicking on "Open in new tab".
Yet another option would be after searching for eval() to pin the search results, so the new search will always be opened in a new tab:
Related
When I use the shortcut associated with "search.action.focusNextSearchResult" in vscode while searching something nothing happens.
This action is initially associated with F4 which is also used for other shortcuts. I thought it may be the problem so I reassigned it to an unused shortcut but it did not help.
I am using the extension "Emacs Friendly Keymap" (don't know if it can cause the problem).
Do you know how I could make it work?
That shortcut, used to go to the next search result, only works in a search editor. It has these context keys:
hasSearchResult || inSearchEditor
Are you using it in a separate search editor? It does work there. Here is one way to open a Search Editor:
If you are using the Find widget then use either of these:
Enter when focus is still in the Find widget or F3 when focus is in the editor.
If you are doing a search across files, then just a downarrow will go to the next result.
Does Intellij allow you to search in previous search results? I can't seem to find anything about it. Might be possible with a custom scope?
To search in previous search results, you need have a search result open in the Find tool window. Then the scope Files in Previous Search Result appears in Find in Path and Find Usages Settings:
I searched the web for an answer to this but was not able to find it in official documentation, forum of IntelliJ or stackoverflow:
In IntelliJ: (How) Can I have multiple search results kept open?
I know there is the possibility of "Recent Find Usages" but this always does a new search. With a big code base this takes a lot of time. Or imagine you need to compare search results.
I now found a solution. See my answer...
When opening the global search dialog (ctrl + shift + f) there is a gear-wheel icon in the lower left. There you can choose to "Open in new tab".
This will keep the previous search result window open and just create a new tab for the new search.
This setting is at least active as long as IntelliJ stays open and also appies to all opened windows / instances of IntelliJ.
Found this answer in a discussion about Visual Studio Code feature request: https://github.com/Microsoft/vscode/issues/16488
Thanks to github user jjinux (commented on 9 Mar 2017)
I use the search in JIRA about 50 times a day and every time it forgets what I just entered. Is there any way to tell it to remember the last search or the project code. (By project code I mean the first few letters of bug code such as "AAQT-").
That prefix is known as the project key.
(Also, what version of JIRA are you using? There are some UI differences between Cloud and most Server instances so my following advice might not make sense.)
There isn't a way to pre-define the project key in the quick search box since most JIRA instances have multiple projects, and pre-defining it for just one project doesn't make sense.
However, your browser should be able to remember previous values entered. You would have to overwrite the numerical portion that follows the key, though.
Do you mean save your search as your favourite filter? If so then you can follow these steps :
Click on "Issues" dropdown then choose "Search for issues"
Click on "New filter" button on the top-left area
Type your query
Click on "Save as" button on the above of query field
Give any search name, then it will be save under "Favourite Filters" section
I'm working on a huge project that has thousands of TODO items. So when I go to the TODO tool window in IntelliJ IDEA it shows all of them. How can I search for a specific one?
If you want to define which TODOs should be found, you are able to set filter and patterns.
In TODO panel click on Filter TODO Items and select Edit Filters
Here you are able to set filters and patterns which should be used. More about that is on their site https://www.jetbrains.com/help/idea/2016.2/defining-todo-patterns-and-filters.html.
Keep in mind that after you define a new filter, Intellij will start with Indexing (long proccess for huge projects:( )
Also Intellij IDEA TODO tool lets you select from which part you want to see a TODOs (top bar on uploaded image) or you can simply show all TODOs and start typing (classic searching).
First, expand all the todos (view the side menu or by pressing CTRL+numpad +. Then just start typing, and IntelliJ will take you to the first place the string you searched for appears, be it a name of a folder, file or the text of the todo comment itself. Like any other search in IntelliJ, you can use the ↑ and ↓ keys to jump between items matching your search string.
If you are using a mac, keys ⌘6 (command key and number 6 key) will do the magic.
Press alt+6 to search *TODO* comment.
You might also want to view only the TODOs you have added in your current branch. You can use the Default Changelist tab for this:
The Scope Based tab also gives you some useful options for narrowing down the TODOs too:
This is not the exact answer to the given question, but it helped for me, so maybe it will also help someone else :)
What I haven't notice earlier is that TODO Tool Window/tab has some child tabs on the top. For me, the most usefull one, was the tab „Current file”. I was made aware of this feature after looking in official IDE documentation:
https://www.jetbrains.com/help/idea/todo-tool-window.html