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

Add additional vi bindings #6648

wants to merge 1 commit into from


Copy link

@Vvalter Vvalter commented Feb 23, 2020

Adds dh, dl, c0, cf, ct, cF, cT, ch, cl, and y0 bindings.


I added a couple of missing vim bindings. This is kind of related to #4019 even though the issues does not mention the missing bindings explicitly.
The dh and ch bindings delete the first character of the line when used at the beginning of the line. This is different from vim, but I did not find a clean way to fix this and I consider this a minor difference.
I also noticed that the y0 binding pastes if used at the beginning of the line. This is the same for the already existing y^ binding so I guess it is not a problem?


  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in

Adds dh, dl, c0, cf, ct, cF, cT, ch, cl, and y0 bindings.
@ridiculousfish ridiculousfish added this to the fish 3.2.0 milestone Feb 24, 2020
Copy link

thank you!

Copy link

Merged as e1a08e3

faho pushed a commit that referenced this pull request Mar 21, 2020
Many people have mentioned wanting support for changing / yanking /
deleting between "" and '', meaning the commands `ci' ci" yi' yi" di' di"`,
so this adds that support in a generic, and thus potentially confusing way.
The concept is that we check for the character backwards and forwards
before making the selection.  Unfortunately, this will also work for *any*
character that isn't `w` or `W`, so `cia` could change everything between
two `a` characters.
Looking through the [bind documentation](
and input handler at `src/input.cpp`,
this is the best possible solution I could come up with until
`forward-jump` and `backward-jump` can accept input in the call to `bind`,
and not just from stdin, meaning we can write a binding as:
bind di\" backward-jump-till \" and repeat-jump-reverse ...`
If that were done, then other commands such as `di)` to go between `()` would
be possible.
There are also some added `y` bindings not part of #6648.
Let me know if you need anything else.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants