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: Any way to remap :W to :w #4689

Closed
mknln opened this issue Mar 27, 2020 · 4 comments
Closed

Vimrc: Any way to remap :W to :w #4689

mknln opened this issue Mar 27, 2020 · 4 comments

Comments

@mknln
Copy link

mknln commented Mar 27, 2020

I was happy to see in #463 that .vimrc support was added. But I can't seem to solve my problem with it, which is that I want to remap :W to :w so that I don't get E492: Not an editor command: W when I don't lift up shift fast enough.

I noted PR #3908 which adds key remapping support, however, I've tried a hodgepodge of things (from rabid and impatient searching) by now and none have seemed to work:

:command W w
noremap :W :w
command! W :w

(The first is my working solution in .vimrc)

Is there a known working way to do this?

Best to you all at a challenging time,

@J-Fields
Copy link
Member

This isn't possible at this time, though I hope to support it soon. PRs are very welcome!
Duplicate of #4454

@qoobes
Copy link

qoobes commented Apr 6, 2020

Just another question on a related subject,

Adding the following to my .vimrc file didn't do anything, is it because the feature isn't there or did I do something wrong. (There's a lot more, it's just an example)

nnoremap ;; :w<CR>

So is this feature not yet implemented?

@J-Fields
Copy link
Member

J-Fields commented Apr 6, 2020

There's currently a limitation that mappings cannot overlap. ; matches before ;; ever has the chance to, so it's triggered and the recorded keys are reset.

@qoobes
Copy link

qoobes commented Apr 7, 2020

Oh, I'll just set it to something else, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants