zed icon indicating copy to clipboard operation
zed copied to clipboard

ProjectPanel support `workspace::ActivatePaneIn*`

Open d1y opened this issue 1 year ago • 2 comments

Check for existing issues

  • [X] Completed

Describe the feature

I want workspace::ActivatePaneIn* to also penetrate (work on) the ProjectPanel, Is there already some way to make it work?

{
    // global mode
    "bindings": {
      "shift-cmd-j": "workspace::ToggleZoom",
      "ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
      "ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
      "ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
      "ctrl-j": ["workspace::ActivatePaneInDirection", "Down"]
    }
}

global_keybind

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

No response

d1y avatar Jan 29 '24 02:01 d1y

VSCode allows moving up and down using bindings in the file tree as well. I would like the same for the Zed Left Dock.

rauann avatar Jan 29 '24 07:01 rauann

workaround keybind

{
	"context": "ProjectPanel && not_editing",
	"bindings": {
	 		"ctrl-l": "project_panel::ToggleFocus"
	}
}

d1y avatar Jan 30 '24 08:01 d1y

I had to do something like this to work properly, because once I was in the terminal, it did not change the Pane and sometimes when I was in the ProjectPanel moving to the right direction would not work. Doing something like this makes everything work as expected.

{
  {
    "bindings": {
      "ctrl-w ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
      "ctrl-w ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
      "ctrl-w ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
      "ctrl-w ctrl-j": ["workspace::ActivatePaneInDirection", "Down"]
    }
  },
  {
    "context": "Terminal",
    "bindings": {
      "ctrl-w ctrl-k": "workspace::ActivateNextPane"
    }
  },
  {
    "context": "ProjectPanel",
    "bindings": {
      "ctrl-w ctrl-l": "workspace::ActivateNextPane"
    }
  }
}

christian-gama avatar Apr 05 '24 18:04 christian-gama