zed icon indicating copy to clipboard operation
zed copied to clipboard

vim-mode support for marks

Open pvanb opened this issue 3 years ago • 3 comments

Check for existing issues

  • [X] Completed

Is your feature request related to a problem?

Marks are a very powerful feature of Vim that allows quick navigation between multiple points in a file (or even across files). Not only do I use them frequently but they are a core feature of Vim so should probably be included eventually.

Describe the solution you'd like

Ideally full support (see https://vimhelp.org/motion.txt.html#mark) or as close to full support as Zed's framework will allow.

A minimally useful subset initially would be the ability to set local marks and move between them:

m{a-z}                  Set mark {a-z} cursor position (does not move the cursor, this is not motion command).
'{a-z}  `{a-z}          Jump to the mark {a-z} in the current buffer. (` for the exact spot, ' for beginning of the line)

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

The Vim documentation describes the feature better than I can.

pvanb avatar Nov 17 '22 17:11 pvanb

Apologies for not seeing this note about reporting missing Vim commands.

Please report issues you encounter while using Vim mode, but read the above note first and try not to report missing commands as they are still actively being added.

I guess my request would then be for a minimal implementation in the short term if full support is going to take a long time.

pvanb avatar Nov 17 '22 19:11 pvanb

The vim mode is always troublesome and time consuming to implement one function at a time. I wonder if it is possible to use ready-made vim as a backend to support all the features, like something like https://github.com/vscode-neovim/vscode-neovim, which of course can be done better as an editor

0x2CA avatar Dec 02 '22 02:12 0x2CA

The vim mode is always troublesome and time consuming to implement one function at a time. I wonder if it is possible to use ready-made vim as a backend to support all the features, like something like https://github.com/vscode-neovim/vscode-neovim, which of course can be done better as an editor

I disagree with this... doing a ready-made drop-in Vim or Neovim implementation would force adaptation of all existing UI patterns in vim/neovim to Zed, whereas they may want it to be written in Rust and native to the editor.

chrisvander avatar May 07 '24 16:05 chrisvander

I'm going to close this long-running task as a precursor to the new #13111, as #11507 should satisfy it. Be sure to follow and +👍 #13111 for global marks support and/or continue your discussion there.

Resolved in #11507.

Moshyfawn avatar Jun 16 '24 16:06 Moshyfawn