zed icon indicating copy to clipboard operation
zed copied to clipboard

Expose directional focus commands

Open jjhiggz opened this issue 1 year ago • 0 comments
trafficstars

Check for existing issues

  • [X] Completed

Describe the feature

I really like navigating the focus around my editor by thinking about left / right / up / down. It would be awesome if there was a "FocusPanelLeft", "FocusPanelRight", "FocusPanelDown", "FocusPanelUp" commands. That way I can flip through panels much easier.

For me I would configure it like this:

  {
    "context": null,
    "bindings": {
      "ctrl-h": "panel:FocusLeft",
      "left": "panel:FocusLeft",
      "ctrl-j": "panel:FocusDown",
      "down": "panel:FocusDown",
      "ctrl-k": "panel:FocusUp",
      "up": "panel:FocusUp",
      "ctrl-l": "panel:FocusRight",
      "right": "panel:FocusRight",
    }
  }

The idea would be if I'm in the explorer on the left, and I focus to the right, I'm in the explorer, and if I focus down, I'm in the terminal.

This can kind of be done now, but it's challenging to confugure, and it's not as good because it doesn't adapt to the current windows that I have own.

Cheers Zed friends :)

If applicable, add mockups / screenshots to help present your vision of the feature

No response

jjhiggz avatar Jan 27 '24 02:01 jjhiggz