center-screen
Center the screen on the selected line
mlitbk 1,317 0 0.2.1 MIT GitHub

Center Screen

Center the screen on the selected line, like zz in vim.

How to use

Activate first by doing one of the following:

  • Choosing Center Screen: Center Screen from the command palette
  • Right click on the line you want to center, and choose Center Screen from the context menu
  • Define a keyboard shortcut, for example:
'.editor':
    'ctrl-alt-z': 'center-screen:center-screen'

After that you can use these methods to center the selected line.

You can choose to keep the selected line centered when you move by using the Follow Cursor option in one of the following ways:

  • Enable Follow Cursor in the settings for this package
  • Choose Center Screen: Toggle Follow Cursor from the command palette center-screen screencast

Credits