Search code examples
android-studiointellij-idea

How to stop toggle line comment from jumping into the next-line in android studio?


I am new to Android Studio, and I am used to VSCode, in VScode, I have a keyboard shortcut called "toggle line comment".

I press Ctrl + Shift + A (that's a custom one, I changed the original one), and I can toggle a line comment.

The cool thing about VsCode is that the cursor stays on the same line, as you can see in the following GIF, Unlike IntelliJ idea (Android Studio) where it jumps into the next line.

Is there any way I can stop this feature from moving my cursor to the next line?

This is in VSCode:

enter image description here

This is in Android Studio:

Android studio example


Solution

  • Go to Preferences | Advanced Settings | Editor and uncheck the Mode caret down after Comment with Line Comment action checkbox.