PhpStorm "Find In Path" defaulting to cryptic string - ide

Normally, using cmd+shift+f will launch PhpStorm's "Find in Path..." feature, and the search text defaults to whatever text is highlighted in the IDE. For me, it defaults to what is highlighted for a fraction of a second, before being replaced with this code:
2223 2BC9 EA71 DED7 8AAE DB73 C773 21A0 E816 78AE
I am not sure what this code represents but it is always the same. I have to delete and re-type or paste the content I want to search in order to continue with my search. The next time I open the "Find in Path" dialog, it happens again.
Does anyone have any clue what this might mean?

It must be caused by GPG tool: https://gpgtools.tenderapp.com/discussions/problems/51070-gpgservices-spurious-select-key-dialog.
Unchecking the box next to OpenPGP: Insert my Fingerprint in Mac System Preferences -> Keyboard -> Shortcuts -> System should help

Related

How to ignore capitalization in Beyond Compare 4

BC4 is currently highlighting lines, even when they differ only by capitalization. I want to ignore those.
In Session Settings, I have UN-checked the box labeled "Character Case".
I have selected the "Minor" button (sub-text: "Ignore unimportant Differences").
I have ensured that the file type (.cs file) corresponds to the rules selected (as suggested here).
What else am I missing?
So, I got an answer straight from Scooter support community:
The character case check box only affects default text (text that isn't a string, identifier, comment, etc).
To ignore character case for non-default text, click the Edit Grammar button.
In the Grammar tab, select the grammar definition that matches the text that should ignore character case, such as Identifier.
Click the Gear icon.
Uncheck This element is case sensitive.
Click OK until you're back to the main window
For the .cs file type, in Session Settings, you will also need to uncheck the box labeled "Identifier" (this is in addition to selecting the "Minor" button as already stated).
This is not necessary for some other file types, such as "HTML", "MS Word Documents", "RTF", "XML", and of course "Everything Else". Simply selecting the "Minor" button will ignore character case.

How to select a text and put it directly on the search and replace bar of IntelliJ

I'm an IntelliJ user since years and I work on a Mac.
For a long I was able to execute like an automata the following procedure:
select a portion of a text in a file using the mouse
pressing a combination of keys
seeing the selected text in the find & replace bar of the IDE.
Now, I can't remember how to do it.
I have search through the docs of the search & replace in a file, but I cannot see that option.
Just to avoid confusion, the toolbar I'm talking about is the following
I am using IntelliJ on linux (Keymap : Default for xwin) and to select text I use Ctrl+W or Mouse double click. Then ctrl+R will put this text in replace text box
Probably it's a kind of bug. It should work by selecting the text and pressing cmd+r.
Cases when it works:
I select a piece of text in a line and I press cmd+R.
I select the whole line (including white spaces/tabs at the beginning)
Case when does not work:
I select a line from the first character to the last.
More context. I use IntelliJ 2017.2.5 on Mac Os Sierra.

How to go to next/previous occurrence in current editor tab?

In eclipse, you can go to the previous/next occurrence of the selected word by pressing ctrl+, / ctrl+..
What is the equivalent in IntelliJ IDEA?
The feature is called Find Word at Caret:
Search for a word at caret enables you to quickly find the exact match for the current word, without changing any search options. With the match once found, you can navigate between the occurrences of the term.
You can use Ctrl+F3 for that:
select a word at caret
hit Ctrl+F3 and then F3 or Shift+F3 to navigate to the
next/previous occurrence
Mac OS
Please note that there is no shortcut on Mac OS. You'd need to use Cmd+Shift+a and type "Find Word At Caret" ("find wo" should be enough) or on the main menu, choose Edit | Find | Find Word At Caret. Press Cmd+g to navigate to go to the next occurrence.
Separate Plugin
Or, try this plugin - it supports using Shift+Alt+Up and Shift+Alt+Down to navigate up and down to each identifier occurrence
To make this feature available by default please, vote for IDEA-59638
Use Ctrl+Shift+F7 to highlight the usages of some variable in the current file, then use F3 or Shift+F3 to navigate through the highlighted usages.
(It works in IntelliJ IDEA 2016.1.3)
Finding Word at Caret: Ctrl+F3:
Search for a word at caret enables you to quickly find the exact match for the current word, without changing any search options. With the match once found, you can navigate between the occurrences of the term.
Note that after it has found occurrences, it immediately goes to the first occurrence.
The functions for this are called Go to {next,previous} highlighted element usage and are available by default only via the menu Edit→Find. No key press is associated to this function by default. (IntelliJ IDEA 2018.3 (Community Edition))
You can set them to a specific key press in the keymap: File→Settings→Keymap→Main menu→Edit→Find and double click on the function you want to set.
EDIT:
IntelliJ IDEA 2021.3 (Community Edition): via main menu Edit→Find Usage→Next(Previous) Highlighted Usage
CMD + Shift + F7 to select all occurrences
than CMD + G to navigate forward
CMD + Shift + G to navigate backward

Is there a shortcut for selecting word under cursor in Sublime Text, Atom

Is there a shortcut or a command to select word under cursor in Sublime Text or Atom? I want a replacement for double-click. So I could press shortcut instead and get selection on a current word and start typing to replace it or get in quotes etc...
command+d on OSX
control+d on Windows/Linux
You can find all the default keybindings by going to Preferences > Keybindings - Default and perusing the list.
You can add a key binding to select the word:
{ "keys": ["ctrl+shift+w"], "command": "expand_selection", "args": {"to": "word"} }
Unlike the find_under_expand command (control+d by default) repeated presses won't add cursors at matching words.
install ExpandRegion if you want to expand the selection:
Expand selection to word
Expand selection to quotes (content only)
Expand selection to quotes (with quotes)
Expand selection to complete self closing tag
Expand selection to parent node content
Expand selection to complete node
Expand selection to parent node content
I looked around for this and eventually came up with this, which I assigned to ctrl-F
you need to paste it into a new user plugin python file
import sublime, sublime_plugin
class find_under_cursor(sublime_plugin.WindowCommand):
def run(self):
view = self.window.active_view()
view.run_command("expand_selection", {"to": "word"})
view.run_command("slurp_find_string")
self.window.run_command("show_panel", {"panel": "find", "reverse": False} )
With Vim bindings (Vintage or vintageous)
* - to find next
# - to find last
For both, all matches are highlighted
Without Vim bindings
For current file: CMD+E, CMD+F, Enter
Explanation:
CMD+E - copies the word under cursor
CMD+F - bring up find in local file dialogue
Enter - er you know what this means
Substitute CMD+F for CMD+SHIFT+F to find in all files in project (or whatever search range you specify)

IntelliJ navigate to next and previous highlighted variable

In IntelliJ 10.5 I have "Highlight usages of element at caret" enabled. When a variable/method/etc is selected, is there a way to move to the next and previous occurrence? I'm looking for the equivalent of Control-K in Eclipse.
Edit: Shortcut to navigate between highlighted usages simply moves to the next text occurrence, which is different than moving to the next occurrence of the variable/method/etc. If I have the variable foo selected, I want to navigate to the next occurrence of foo and not any piece of text called "foo" (including "foo" in comments, method names, etc).
Also, pressing F3 seems to be buggy. When I press F3, it sometimes searches using the previous searched text and not the currently highlighted text.
F3 or shift+F3
ctrl+c, ctrl+f, enter or up and down arrows
ctrl+alt+F7
Added this in case people don't look at your edit.
It's not currently possible, see my question: Shortcut to navigate between highlighted usages.
I even created an issue IDEA-70523 addressing this feature, please vote for it if you can't live without it like me :-).
Install Identifier Highlighter Reloaded and use Alt + Shift + Up/Down (can be redefined in Keymap settings) :)
After you give it a shot and notice the 'hey, the highlight stays there after I move my cursor out of it' annoyance, consider upvoting this issue :)
In the Mac OS, you can navigate to next highlighted usage by press control + option + up/down arrow.
Vote this request up for make them implement the feature.
http://youtrack.jetbrains.com/issue/IDEA-59638
I found something thay may more suite your needs : alt + mouse-wheel up/down.
It goes to previous / next occurrence of identifier under caret.
Shortcut name is "Go to next highlighted element usage".
I usually do the following:
Highlight the word
Cmd + F (it will highlight all the matches in file)
Cmd + G (next match)
Cmd + Shift + G (previous match)
I could not get any of IntelliJ's native options for Find Next/Previous to behave like in Eclipse. Find Word at Caret comes close, but it only allows you to slurp and find the next word, not previous.
Identifier Highlighter Reloaded also does not behave like Eclipse.
I wrote an IntelliJ plugin to reproduce the exact behavior as in Eclipse. You can find it here: https://plugins.jetbrains.com/plugin/10635-quick-find-plugin
Look for next occurrence # Keymap
^G = "select" the variable that you want to search for
[shift]⌘G = [previous]next occurrence of selected variable
All credits to #Igor Wojda for his comment in the accepted answer.
(AFAIK, limiting search scope to only variable/method is not possible)
For text based match and quick jump:
Simply place the cursor over the desired word to be searched
Press Ctrl+F3
For further down/up search, simply use
F3/Shift+F3 respectively
in Intellij shortcut for this action, it's not defined.
but you can define it like this:
Ctrl+ Alt + S
search " highlighted usage"
then you can set a shortcut for that.
Ctrl+Alt+Up and Ctrl+Alt+Down navigates to the next and previous usages of a highlighted variable in IntelliJ.
I use this functionality of navigating to the next usage of a variable in a file by hot in Visual Studio all the time (Ctrl+Shift+Up and Ctrl+Shift+Down) and was looking for the equivalent in IntelliJ