Supporting both vi and vim "cW" semantics #12788
Replies: 3 comments 1 reply
|
I don't think I think we don't want I'll push it |
|
I know you said you'll push it, and that's fine if you get around to it before I get my tweak done, but I'm going to go ahead with fixing my branch and touching it up as a PR just in case it saves you some effort. WRT to halucinations: I had specifically directed it to do the "fish_vi_cw_keeps_whitespace" route because of a (mis?) reading of those other discussions, thinking that it was a deliberate choice. Once you have the environment variable, the test isn't redundant. ;-) |
|
Created a PR in #12790 |
Uh oh!
There was an error while loading. Please reload this page.
By default the fish vi mode, when you do "cW" deletes to the beginning of the next WORD, but in vim it deletes to the end of the current WORD. I remember when I came to vim ~20 years ago that it took a while for me to get used to that, but now I'm decidedly used to it and it is painful in fish (I usually have to submit my commands twice when I use cW). Note: bash and zsh also match vim and diverge from fish.
I am aware of #12443 and #12269 and I'm getting the sense that this "cW" behavior is preferred because it matches vi behavior.
I've got a PR ready at https://github.com/linsomniac/fish-shell/tree/vim-mode-cw
that implements an option called "fish_vi_cw_keeps_whitespace", with the default being the current behavior, but can be set to match vim/bash/zsh.
I wanted to open a discussion before just landing a feature. Any opinions?
All reactions