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

Support vim word completion with ctrl-p and ctrl-n #17461

Open
1 task done
quinncomendant opened this issue Sep 5, 2024 · 0 comments
Open
1 task done

Support vim word completion with ctrl-p and ctrl-n #17461

quinncomendant opened this issue Sep 5, 2024 · 0 comments
Labels
enhancement [core label] vim

Comments

@quinncomendant
Copy link

Check for existing issues

  • Completed

Describe the feature

It doesn't seem possible to do vim word completion in Zed. In regular vim, it's ctrl-p/ctrl-n, but in Zed that goes to previous line/next line.

For example, if I type the following, then hit ctrl-p after typing autoc, vim mode should complete the word to autocomplete:

This document contains the word autocomplete.
Let’s try to autoc<ctrl-p>

Expected result:

This document contains the word autocomplete.
Let’s try to autocomplete

VIM autocomplete has a lot of features that would be useful in Zed. The docs include some useful options:

The Vim editor goes through a lot of effort to find words to complete. By default, it searches the following places:

  1. Current file
  2. Files in other windows
  3. Other loaded files (hidden buffers)
  4. Files which are not loaded (inactive buffers)
  5. Tag files
  6. All files #included by the current file

If you know what you are looking for, you can use these commands to complete with a certain type of item:

CTRL-X CTRL-F file names
CTRL-X CTRL-L whole lines
CTRL-X CTRL-D macro definitions (also in included files)
CTRL-X CTRL-I current and included files
CTRL-X CTRL-K words from a dictionary
CTRL-X CTRL-T words from a thesaurus
CTRL-X CTRL-] tags
CTRL-X CTRL-V Vim command line

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

No response

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

2 participants