I am looking for a command in JetBrains IDE's (specifically WebStorm and Rider) to set a keyboard shortcut that will center the caret in the center of the editor page.
Is this possible with a shortcut or extension?
Just to be clear, I don't want to move the page to center the caret (which already exists with s shortcut), I want to move the caret to the center of the page, without moving the editor page view.
Sure, you can just use
Ctrl + Mto move the caret to centre of the screen.If you don't want to have to hit
Ctrl + Mall the time, you can also achieve what you want by using theIdeaVimpluginIdeaVimplugin and install.$HOME/.ideavimrcset scrolloff=XXwhereXXis at least half the total lines you would usually see. Setting 'scrolloff' to a large value causes the cursor to stay in the middle line when possible. e.g.set scrolloff=999Tested and working in PHPStorm and PyCharm