I want to have the 'Ctrl'+'K','Ctrl'+'D' functionality of Sublime in Android Studio, how do I do it?
Perfectly similar to this question, but with respect to Android Studio. How do I skip a match when using Ctrl+D for multiple selections in Sublime Text 2?
I use Ctrl+D to add to selection (discrete multiple select) the next occurrence of the string (or substring) highlighted. And to skip adding next immediate selection to selection but the one after it, I use Ctrl+K, Ctrl+D. How do I do the same in Android Studio.
I just know Alt+J is similar to Ctrl+D (found from Keymappings in Android Studio).
And to deselect the last selected it's Alt+Shift+D.
But how do I skip next occurrence?
My question is in no way related to: Does IntelliJ IDEA have a `Ctrl` + `K`, `Ctrl` + `D` equivalent?. That's Visual Studio equivalent. I want the SublimeText equivalent.
Select next occurrence: Alt + J (Ctrl + G for Mac OS X)
Unselect next occurrence: Shift + Alt + J (Shift + Ctrl + G for Mac OS X)
It is described in this Issue that was initially created because this skip-next was missing.
Anyhow you just press F3 to skip next possible selection.
If you are using OSX, there are two answers, depending on what keymap you have selected in Preferences:
Keymap : Mac OS X 10.5+
To start / add to your discrete multiple selection : CTRL+G
To skip the current selection and move to the next : CMD+G
Keymap : Mac OS X
To start / add to your discrete multiple selection : CTRL+G
To skip the current selection and move to the next : F3
(this mode is really awkward IMO - no flow)
If you have more follow up questions I had success asking support via this thread : https://youtrack.jetbrains.com/issue/IDEA-121956
Go To Settings -> Keymap -> Main Menu -> Edit -> Find
OR Search for the following options in Settings -> Keymap
Set the shortcuts for the following (Linux/Mac) :
Add Selection for Next Occurrence
: Ctrl + D
/Cmd + D
Find Next/ Move to Next Occurrence
: Ctrl + K
/Cmd + K
You might also want to setup Unselect occurrence:
Unselect Occurrence
: Ctrl + U
/Cmd + U
Carefully remove/replace/override any other existing bindings with these shortcuts according to your needs. You should have Sublime Text Ctrl+D, K behaviour working.
Note: Test these shortcuts for functionality with the default key bindings first. This will ensure, you get working shortcuts with your favourite shortcut keys.
I needed to use sublime's Ctrl+D (switch between multiple selected).
The F3
key worked for me.
Success story sharing
ALT+SHIFT+.
. See this for all the other shortcuts jetbrains.com/help/rider/…