Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the equivalent shortcut for CTRL+D ("add selection to next find match") of VSCode in CLion?

Usually in Visual Studio Code, if I want to delete or modify a certain word from my file, I can highlight one of the words and then continuously press CTRL+D to highlight the rest of that same word in the file. But, in CLion, I am unable to find the equivalent shortcut.

I've Googled and searched here on StackOverflow but no luck. Maybe this shortcut doesn't exist in CLion? Can anyone confirm?

EDIT: It's also known as "Select next occurence" in other JetBrains products.

EDIT: The answer is ALT+J

like image 993
jayweezy Avatar asked Oct 12 '25 10:10

jayweezy


2 Answers

it is alt+j in all of jetbrains products

like image 163
Vulwsztyn Avatar answered Oct 16 '25 07:10

Vulwsztyn


So I just want to hit on a couple of options that you have, because I work with both CLion & VSCode as well, and needed the same exact keybinding in CLion.

KEYBINDING FUNCTIONALITY SEMANTICS

Unfortunately, it appears that no one cares about standardizing semantics when it comes to editor functionality/features, and keybindings. It can make moving from one editor to the next difficult, and flat out something many people just would rather not have to do.

Please Note:

_I am no expert on JetBrains IDE's, I am somewhat of an expert with VSCode though. I say this because, IDK how much JetBrains IDE's vary from one to the next, however, from having CLion, IntelliJ, and Access to Ryder I can tell you that in the standard IDE's the keymappings seem near Identical, but in Ryder, the keybindings are totally different.

DEV ENVIRONMENT BOUND-KEYS (dev env's default) SEMANTICS
CLion ALT+J "Add Selection for Next Occurrence"
Visual Studio Code CTRL+D "editor.action.addSelectionToNextFindMatch"
Visual Studio 2022 (IDE) SHIFT+ALT+. "Edit.insertNextMatchingCaret"

the The correct semantics for referring to the functionality you seek in CLion is contingent on the environment that its being implemented in. The following demonstrates how to correctly reference it in both JetBrains & Visual Studio Environments:

Add Selection To Next Find Match Ctrl+D editor.action.addSelectionToNextFindMatch

Once you know the semantics of the functionality that you want to customize, you no longer have to resort to using any editors default key mapping. You asked about, CLion, so I will demonstrate, in an image (or screenshot) below, how you can change the keybinding to be anything you want it to be.



Changing keys in CLion



To get to the window you see in the photo navigate by following the steps below.
  1. Starting from the text editor, find the word 'FILE' on the 'MENUBAR' located at the very top of your screen.
  2. Click on 'FILE' to drop open the 'FILE MENU'.
  3. Scan through the __FILE MENU'_s ITEMS, until you see the selectable ITEM named 'SETTINGS' (it will have a wrench icon next to it). 4 Select 'SETTINGS' by left-clicking it, and you'll open the 'SETTINGS MENU' open.
  4. Another 'LIST' will appear on the left side. There will be 'BOLD ITEMS' and regular weighted SUB ITEMS. Find the 'BOLD ITEM' that reads 'KEYMAP'.
  5. Select 'KEYMAP'.


The image above shows the view in my IDE of the keymap menu. You can see a red arrow, as well as a green arrow, in the image.

GREEN ARROW

The green arrow shows where you can change the entire Keymap, as you can see in the image, mine is set to VSCode, and as far as I can tell, every keybinding is the same as in VSCode. You do have to download the VSCode keymap plugin though.

RED ARROW

The red arrow shows where the "Bound Keys" are listed. Right click on the keybinding and you'll see a menu that reads

  • Add Mouse Shortcut
  • Add Keyboard Shortcut
  • Add Abbreviation

"it may also have options for removing keybindings and mouse shortcuts, it all depends on how the keybinding you click on is configured"

To set the keybinding select Add Keyboard shortcut, and set it to what ever you want.

like image 45
j D3V Avatar answered Oct 16 '25 07:10

j D3V