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

vi binding 'e' has wrong behaviour on second-to-last char #4025

Closed
Ambrevar opened this issue May 13, 2017 · 2 comments
Closed

vi binding 'e' has wrong behaviour on second-to-last char #4025

Ambrevar opened this issue May 13, 2017 · 2 comments
Labels
bug Something that's not working as intended vi-mode
Milestone

Comments

@Ambrevar
Copy link
Contributor

  • fish, version 2.5.0-384-g9e64571d
  • OS: Arch Linux
  • Term: Urxvt 9.22

Using vi bindings, if the cursor is on 1 in

12 345

pressing e in normal mode will move to 5 while it should move to 2.

The current definition of e is

bind e forward-char forward-word backward-char

I believe the following binding to be correct:

bind e forward-word backward-char
@faho
Copy link
Member

faho commented May 13, 2017

This was added to fix #2171.

I believe the following binding to be correct:

bind e forward-word backward-char

That binding has the issue that it will get stuck on "bigwords". E.g. executing it multiple times on "12-345" will have the cursor go to "2", then "-" and then get stuck there.

We probably need to introduce additional bind functions here - "end-of-word" and "beginning-of-word".

@faho
Copy link
Member

faho commented Sep 27, 2020

Also fixed by #7354.

@faho faho closed this as completed Sep 27, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended vi-mode
Projects
None yet
Development

No branches or pull requests

4 participants