Action for "Find in Files" in JetBrains IDEs - jetbrains-ide

In JetBrains IDEs, Main Menu | Edit | Find | Find in Files.... On Mac it has Cmd + Sift + F shortcut.
Does anybody know what action it is? I could not find it in IntelliJ action list.

Try FindInPath ("Find in Path" -- that's what "Find in Files" used to be called in the past; they have changed the name about 2 years ago or so).
Found the name here: https://gist.github.com/zchee/9c78f91cc5ad771c1f5d

Related

JetBrains Rider - "Search Everywhere" command different to one triggered by Shift+Shift

Seen in both Rider and IntelliJ:
I want to rebind the command triggered by a double tap of Shift, which by default brings up this dialog:
My understanding was this was the "Search Everywhere" command, but if I run that command I get the following:
What is the command run by a double tap of shift called?
You must have assigned that shortcut to the wrong action.
I'm not using Rider... but in PhpStorm (another IDE built on IDEA platform) it will locate 2 matches (as seen on screenshot below) when you search for everywhere on the "Keymap" screen.
The correct action is Main menu | Navigate | Search Everywhere. For me it bring the same popup as double Shift.
P.S. Once again: the screenshot is from PhpStorm 2020.2.1. It may look different in Rider (but similar in IntelliJ).

Find action keyboard shortcut in Android Studio opens terminal on macOS `\;type\=a` (Command-Shift-A) [duplicate]

This question already has an answer here:
IntelliJ IDEA Cmd+Shift+A (Find Action) causes error log: "Nothing appropriate" in a yellow terminal titled "apropos"
(1 answer)
Closed 2 years ago.
The community reviewed whether to reopen this question 12 months ago and left it closed:
Original close reason(s) were not resolved
When I go to use the keyboard shortcut for "Find action" (command+shift+A), macOS opens the terminal and with some output: myPreviousSearchResult\;type\=a,(replace myPreviousSearchResult with the previous search result you did on in the search bar).
It doesn't happen all the time, which adds to the peculiarity, and often does not happen when I first launch the search bar. Only the second search and onwards.
Here is an example:
Answering my own question because finding the notice took me too long and was quite frustrating. I considered glitchy IDE plugins, other apps installed, and searched the web for all sorts of terms. I didn't consider the OS was adding shortcuts for random things like this.
You need to disable a keyboard shortcut in System Preferences > Keyboards > Shortcuts > Services > Text (dropdown menu) > Search man Page Index in Terminal.
If anyone has suggestions on debugging keyboard shortcuts (finding out which apps are handling them), please let me know.

How to find hardcoded strings in kotlin

Android studio lint don't work for a kotlin project.
I can't find hardcoded strings.
What can be solution for this?
Do these steps it worked for me
Download Android Studio 3.2 (in preview right now)
Open find in project window (cmd + shift + F for Mac)
Check Regex checkbox(Top right corner).
Check file mask(next to Regex) and type *.kt or choose kt from the
drop down.
Type this regex = \"\w+\" you can see the results now.
Search with this regex =\"\w+\" in case code is not formatted
properly.
Use Edit/Find/"Find in Path" (shortcut is Cmd+Shift+F on Mac).
Then select the check on "Regex?" at the top of the "Find in Path" window and type \"*\" in the search input.
Then choose to search in Directory and then select the directory with kotlin files. Search separately in /activities and in /fragments (and any other directory where you might have kotlin code).
(To search for raw strings use \"\"\"*\".)
Screenshot of "Find in Path" search for strings example
I'm not sure if this is a 100% reliable solution but it worked for me. "Analyse -> Run inspection By Name" then type "Hardcoded strings" does not work for me.
I suggest using Detekt for static analysis in Kotlin, specifically the string literal duplication.
Ah, well actually there's an update.
Kotlin IDE does understand org.jetbrains.annotations.PropertyKey 11, but it does not always work.
I have had problems if the bundle contains more than one language.
Example:
fun message(#PropertyKey(resourceBundle = "Messages") id: String) =
ResourceBundle.getBundle("Messages").getString(sid) ?: "###$id###"
For more visit:https://developer.android.com/studio/write/lint#src

What do "Lookup Down" & "Lookup Up" actions do in Android Studio?

When I was going to assign ctrl+down/up to f3 & shift+f3
I came across these two commands which had the same keyboard shortcut:
"Lookup Down" and "Lookup up"
Location: file > setting > keymap > other
Couldn't find anything about them. After removing ctrl+up/down from the scroll up/down action I tried them in editor space but they don't lookup/down for the previous searched word. any ideas?
More generally, is there any complete documentation/help for android studio?
These links doesn't seem to have such a complete documentation
http://tools.android.com/
https://developer.android.com/studio/intro/index.html
Also couldn't find anything on IntelliJ IDEA help.
Android Studio is based on JetBrains' Intellij IDEA, so most of the information you're looking for would be the same regarding the IDE.
I'm not sure about the specific shortcut you mentioned, but you can find a complete default-assigned shortcuts reference link inside Android Studio's help menu named "Default Keymap Reference".

IntelliJ IDEA global search

I would like to search across projects for variable usages, or at least for strings. I've got IndexYourFiles which works well for text searches, but I have to re-index every now and then and would like an integrated solution.
Is there any way that I can search across projects in IntelliJ IDEA? So far I have only been able to search within the currently-open project. I'm guessing IntelliJ can't do this natively; are there any plug-ins out there to support this?
Thanks.
IntelliJ is project based so you can only search within the open project using Ctrl + Shift + F(Windows) or Cmd + Shift + F(Mac).
When I need to search across a set of projects I use Agent Ransack
IntelliJ 13 (at least) has "Edit/Find/Find in Path...".
It has the Scope option which can be set to a directory, so if all projects are in the same directory (e.g. IdeaProjects) then it will search all projects.
Use grep.
In the terminal, go to the root directory of your project, and type grep -r my_string_here ..
You can add color to your search with --color (just add alias grep='grep --color' to your.bash_profile, and add-i` to make your search case-insensitive.
In the IntelliJ now it is very easy to find the anything through just two clicks and search on the bar.
Double click on shift and enter the keyword in the search bar.
I'm using ubuntu which I found the shortcut.
My workplace eventually set up Atlassian Fisheye which allows us to search for code or specific files across all of our projects, and it's working well.

Resources