Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim-mode support for marks #5122

Closed
1 task done
pvanb opened this issue Nov 17, 2022 · 4 comments
Closed
1 task done

vim-mode support for marks #5122

pvanb opened this issue Nov 17, 2022 · 4 comments
Labels
enhancement [core label] vim

Comments

@pvanb
Copy link

pvanb commented Nov 17, 2022

Check for existing issues

  • 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 pvanb added enhancement [core label] triage Maintainer needs to classify the issue labels Nov 17, 2022
@pvanb
Copy link
Author

pvanb commented Nov 17, 2022

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.

@JosephTLyons JosephTLyons added vim and removed triage Maintainer needs to classify the issue labels Nov 18, 2022
@0x2CA
Copy link
Contributor

0x2CA commented Dec 2, 2022

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

@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
@chrisvander
Copy link

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.

ConradIrwin added a commit that referenced this issue May 10, 2024
Release Notes:
- vim: Added support for buffer-local marks (`'a-'z`) and some builtin
marks `'<`,`'>`,`'[`,`']`, `'{`, `'}` and `^`. Global marks (`'A-'Z`),
and other builtin marks (`'0-'9`, `'(`, `')`, `''`, `'.`, `'"`) are not
yet implemented. (#5122)

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
osiewicz pushed a commit to RemcoSmitsDev/zed that referenced this issue May 18, 2024
Release Notes:
- vim: Added support for buffer-local marks (`'a-'z`) and some builtin
marks `'<`,`'>`,`'[`,`']`, `'{`, `'}` and `^`. Global marks (`'A-'Z`),
and other builtin marks (`'0-'9`, `'(`, `')`, `''`, `'.`, `'"`) are not
yet implemented. (zed-industries#5122)

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
@Moshyfawn
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] vim
Projects
None yet
Development

No branches or pull requests

5 participants