Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure IntelliJ IDEA comment shortcut to not go to next line?

IntelliJ IDEA's keyboard shortcut for commenting, Ctrl+/, moves the cursor to the next line after it comments out the line. Is it possible to configure it so that it stays on the same line?

like image 473
badjr Avatar asked Nov 06 '15 05:11

badjr


People also ask

What is the shortcut to 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.

What is Ctrl K in IntelliJ?

I think Android Studio/IntelliJ doesn't play that well, for me, I changed Android Studio Keymap to Eclipse as I used to (My collection tips) and to use Ctrl + K , I press search the string first: Select the text we want to search. Press Ctrl + F , Enter. Then can use: Ctrl + K in any file we are on.

What is Ctrl Shift O in IntelliJ?

In Eclipse, you press CTRL + SHIFT + O “Organize Imports” to import packages automatically. For IntelliJ IDEA, if you press CTRL + ALT + O “Optimize Imports”, it just removes some unused imports, never imports any package.


1 Answers

Go to File -> Settings -> Advanced Settings, and toggle 'Move caret down after Comment with Line Comment action' in the Editor secion

source

like image 87
szmozes Avatar answered Oct 20 '22 08:10

szmozes