Automatically center the screen after moving with easymotion

73 Views Asked by At

I am using the Vim extension for VSCode. I like to keep my cursor aligned in the middle of the screen. It's why i remapped a few keys to perform automatically zz after the commands. How is it possible with the easymotion feature ? I would like to be directly centered whenever i move to another word. Thanks !

I tried to browse the internet but found nothing... I do not want to press zz after each move.

2

There are 2 best solutions below

1
accoumar On

i found solutions for vim, see Center cursor position after search in Vim or VIM: center screen position on current line after jumping to a mark. But I can not translate it for vscode vim.

1
accoumar On

For those interested, the answer is related to vscode directly, by setting: "editor.cursorSurroundingLines": 100,