Is there a way to center the file on the cursor like Emacs Ctrl-L, but in IntelliJ?

Is there a way to center the file on the cursor like Emacs Ctrl + L , but in IntelliJ? I would like to better scroll through the file using IntelliJ. When I get to the bottom of the viewing screen, I would like to set the Ctrl + L hotkey to center the file with the cursor in the middle of the screen.

+7
file intellij-idea
source share
2 answers

Use Ctrl + M to go to the center. M = medium.

+6
source share

You can install it as you like, just go to File → Settings → IDE Settings → keyboard layout →, then set a shortcut.

To go to the beginning / end of a file, use ctrl+home/ctrl+end on Windows/Unix

or command-home and command-end on Mac

In my windows, set the shortcuts to

crtl+m → to scroll to the middle of the file

crtl+up to scroll up

crtl+down to scroll down

0
source share

All Articles