Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA Hotkey for comment does not work with Scala

None of the hotkeys (Ctrl+Slash or Ctrl+Divide, Ctrl+Shift+Slash or Ctrl+Shift+Divide) as mentioned here doesn't work with my IntelliJ IDEA 11.1.2. Installation under Windows 7, 64 Bit. I use a German keyboard layout.

What am I doing wrong ?

like image 438
John Threepwood Avatar asked Jun 05 '12 12:06

John Threepwood


People also ask

What is the shortcut key for comment in IntelliJ?

To quickly add a line comment in IntelliJ IDEA, press ⌘ / on macOS or Ctrl + / on Windows and Linux. Block comments or multi-line comments usually take the form of a paragraph.

How do I comment code in IntelliJ?

Comment and uncomment blocks of codeFrom the main menu, select Code | Comment with Block Comment. Press Ctrl+Shift+/ .

How do I comment out a block in IntelliJ?

Quickly comment/uncomment blocks and lines. In WebStorm, you can comment and uncomment blocks of code with Cmd+Shift+/ on macOS and Ctrl+Shift+/ on Windows/Linux. To do the same for lines, use Cmd+/ or Ctrl+/.

How do I change the shortcut key in IntelliJ?

Use ⌘⇧A (macOS), Ctrl+Shift+A (Windows/Linux) for Find Actions and type in the action you'd like to assign a keyboard shortcut to. Then use ⌥⏎ (macOS), or Alt+Enter (Windows/Linux) and type the keys you want to trigger that action in the future. Enjoy your new shortcut!


1 Answers

This issue is specific to your keyboard layout, you need to change the Comment with line comment and Comment with block comment shortcuts in Settings | Keymap.

like image 155
CrazyCoder Avatar answered Sep 28 '22 09:09

CrazyCoder