zed icon indicating copy to clipboard operation
zed copied to clipboard

vim: Support scroll bindings in project panel

Open 1925381584 opened this issue 1 year ago • 7 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

when the projectpanel is long, Needs to scroll like vim::lineup, It doesn't seem to be supported now

Environment

Zed: v0.150.0 (Zed Dev 30bfa56a2491b9991e864dc17ca7a50e75365a2c) OS: Windows 10.0.19045 Memory: 15.7 GiB Architecture: x86_64 GPU: Intel(R) Iris(R) Xe Graphics || Intel Corporation || Intel driver

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

No response

If applicable, attach your Zed.log file to this issue.

Zed.log

1925381584 avatar Aug 20 '24 20:08 1925381584

Thanks for suggesting this! If you'd like to pair with me on this: https://calendly.com/conradirwin/pairing

ConradIrwin avatar Aug 22 '24 04:08 ConradIrwin

Thanks for the invite, but I've never paired it and I don't know much about rust for a while. I just really like the editor. I just feel like it's an editor that a group of people with real grunts and vision could make and go on to perfect, and it's very much to my liking. I also look forward to participating in the future once I know more about the background and details.

1925381584 avatar Aug 22 '24 04:08 1925381584

+1!

at a bare minimum zz support would be awesome, something like the following:

  {
    "context": "ProjectPanel && not_editing",
    "bindings": {
      "z z": "project_panel::ScrollCursorCenter"
    }
  }

the ability to search the tree with /<filename> would be super helpful as well

bryan-pop avatar Sep 18 '24 00:09 bryan-pop

the ability to search the tree with /<filename> would be super helpful as well

This is a lifesaver @ConradIrwin ! There is already #17547 , but what I feel is missing is a simple keybinding for that. Vim users can define /, other users can define whatever they want.

Either that, or just apply a whole set of sensible keybindings for the panel when vi mode is on. After all, vi users do not want to take their hands from the keyboard ;)

ferrao avatar Oct 21 '24 20:10 ferrao

As the previous comment suggested, how about adding an option to make the file explorer fully vim-like? I’d propose using something similar to nvim-tree as a reference (here's the link), as it’s what I think most ((n)vim-)users are likely familiar with and offers (in my opinion) a solid default keybinding setup.

It would also be great to have an option to toggle line numbers in the file explorer and to be able to jump by line, e.g., with 5j. I know this might be a bit ambitious, but it would definitely be a welcome addition!

niekdomi avatar Jan 11 '25 15:01 niekdomi

Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 7 days. Thanks for your help!

github-actions[bot] avatar May 14 '25 07:05 github-actions[bot]

On the latest stable version, 0.185.16, I can scroll up and down with j and k, can go all the way to the bottom with G and back to the top with gg, just like in vim.

So I think this one can be closed.

ferrao avatar May 14 '25 09:05 ferrao