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

vimrc support #4456

Open
1 task done
bluc41 opened this issue Sep 21, 2023 · 8 comments
Open
1 task done

vimrc support #4456

bluc41 opened this issue Sep 21, 2023 · 8 comments
Labels
enhancement [core label] vim

Comments

@bluc41
Copy link

bluc41 commented Sep 21, 2023

Check for existing issues

  • Completed

Describe the feature

Being able to point to a .vimrc file and have vim mode use those bindings

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

No response

@bluc41 bluc41 added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Sep 21, 2023
@JosephTLyons JosephTLyons added vim and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Sep 23, 2023
@ConradIrwin
Copy link
Member

Thanks for the suggestion @bluc41! Supporting all of vimrc is probably out of scope for now, but it sounds like maybe the primary things you care about are your keybindings?

If so, would you mind giving me some examples of things you use, and I'll see if we can figure out how to make them work in Zed.

What other things do you really want from there?

@bluc41
Copy link
Author

bluc41 commented Sep 25, 2023

Thanks for the suggestion @bluc41! Supporting all of vimrc is probably out of scope for now, but it sounds like maybe the primary things you care about are your keybindings?

If so, would you mind giving me some examples of things you use, and I'll see if we can figure out how to make them work in Zed.

What other things do you really want from there?

Yea totally understand -- was just thinking about lowering onboarding friction. I love that y'all start with a base set of key bindings, makes it really easy to switch to Zed.

My personal needs are fairly simple, I map ctrl-j to 5j (down 5 lines) for fast nav, jk to go back to normal mode, etc.

I poked around the vim.json but couldn't figure out how to bind something to repeat an action.

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

I've been using Zed and it's an awesome editor, but it seems that the keybinding features are quite limited right now.

Would it be easy to allow for chaining multiple commands? This way, people could replicate special functions with arrays of commands.

So for example, to comment out a paragraph, we would map g c i p to a sequence of commands like [ "SelectParagraph", "Comment", "Unselect" ].

If we could map a keybinding to an arbitrary sequence of keypresses that might work as well.

@ConradIrwin
Copy link
Member

Yup! This is tracked at #7033. If you’d like to work on it with me, feel free to book time at https://calendly.com/conradirwin/pairing

@giorgioskij
Copy link

Hi! I too would love to have a configurable .vimrc: the main thing I miss is jk and kj to go back to normal mode, U mapped to redo and stuff like that. I'm writing on this thread because #7033 is not really the same thing, I'm note sure whether the two things can be considered a single feature or two separate ones. If you guys agree that this is useful, I would love to work on this.

@giorgioskij
Copy link

Nevermind, I just found out that I can actually do what I want with zed keybindings (https://zed.dev/docs/vim). Sorry for not reading docs earlier, with the issue being open I thought that this wouldn't be possible.

@awvalenti
Copy link

I'd love to be able to use my vimrc file, too. Some of my most important stuff:

nnoremap U <C-r>
noremap ' `
noremap - ^
nnoremap = $
vnoremap = $h
onoremap = $
noremap H <C-b>
noremap M zz
noremap L <C-f>
noremap _ g~l
nnoremap <Tab> "_
imap jk <Esc>
nnoremap K kJ
set clipboard=unnamed,unnamedplus

@betoharres
Copy link

it's really hard to move from vim/neovim if it's not something like gvim inside the editor; until that happens I'm going to stick with just good old vim

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

7 participants