-
Notifications
You must be signed in to change notification settings - Fork 28
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
Swap d
and r
for better vim compatibility
#12
Comments
This is by design (see README). Granted the design is debatable, but that's a much larger discussion. Use |
Thanks for explaining. But yes, I think it should adhere to vim's behaviour as closely as possible. |
@jpotterm I'm curious as to the reasoning behind this. This and the lack of ">" are the only things where I'm pretty sure they are now so hard-wired into my brain that using simple-vim would become a step back in productivity that is greater than what would be gained by having the default multiple cursors working well. Any chance you could add an option for |
@gerrywastaken Sorry about that. I'm happy to explain the reasoning behind it, but I'm not going to add a configuration option for that. If you can't tell by the many deviations from regular vim, simple-vim was never meant to be as close as possible to that experience. I wrote it mostly as an experiment and for my personal use. The experiment was to see how little code (and effort) I could use and still have a vim extension that was useful. So hopefully 20% of the effort for 80% of the usefulness. To achieve that goal I decided to try as much as possible not to duplicate native VSCode functionality in simple-vim. Another feature that I cut to try to make things as simple as possible was named registers. Named registers can be useful, but personally I use the default register most of the time. The main reason I use named registers in vim is to prevent So anyway that's the reasoning behind it. I realize there are a lot of decisions simple-vim makes that can be annoying for long time vim users, and I'm sorry about that. If you want all of your muscle memory to work without changes, I recommend you use an extension that prioritizes that (like VSCodeVim). That's definitely not a priority for simple-vim. But this extension is open source so if someone wants to fork and make something like simple-vim that prioritizes compatibility with vim I'm sure people would find that useful. Or if VSCodeVim wants to take the multi-cursor ideas from simple-vim and use them, that would be great (although I think it would be a huge architectural change for them). |
I absolutely agree with your decision to skip implementing registers. However, it would make my life a lot easier if you added an option to swap d and r. I absolutely understand why you want a delete that doesn't overwrite the register and I absolutely support the idea of having that, but changing the behavior of d is not the right way to go IMHO. Also for your 'easier for newbs' argument. I'd argue that nobody new to vim will come to learn vim on VSCode, and especially not with something other than the most popular vim extension. And even if they would you're teaching them vim wrong. 80% of the time I want dd to also yank. And the brain-rewiring is hard, and all other editors where I use vim controls behave differently. So please, please reconsider adding an option for this. Also, I don't know TypeScript yet, but would you accept a PR if I were to implement the option? |
Good points. I agree that the "easier for newbs" argument is a weak one and you're probably right that the vast majority of people using this extension will already know vim. I guess the real reason is that I feel like 80% of the time I use Don't worry about submitting a PR. It's ridiculously easy to implement. The philosophy is the only thing I'm considering. |
d
and r
for better vim compatibility
Thank you for making this extension! Unfortunately, I couldn't get over the muscle memory difference between |
I really appreciate your thoughtful response and the reasoning. Even if you don't end up making the change I really appreciate that response. :) |
Can you merge in Joey's (jl) changes to support 'dd' and 'p' as it is suppose to be handled? |
I'd also like |
@abuisman I'm glad you like the multi-line support! I worked really hard on that. I originally looked in to using VSCode keybindings for configurability, but I don't think they will work. They could probably do |
dd
deletes the current line, but the line is not on the clipboard, so you can't paste it usingp
.The text was updated successfully, but these errors were encountered: