Improve the fish_config/bindings page #3325

Closed
jinliu opened this Issue Aug 23, 2016 · 7 comments

Projects

None yet

4 participants

@jinliu
Contributor
jinliu commented Aug 23, 2016 edited
  • Have you checked if problem occurs with fish 2.3.1?
  • Tried fish without third-party customizations (check sh -c 'env HOME=$(mktemp -d) fish')?

fish version installed (2.3.1):

OS/terminal used: archlinux / konsole

I'd like to make some changes to the "bindings" page.

Rationale:
The purpose of this page is for end user to discover fish keybindings, not for technical details ("bind" command is for that).

  1. Remove information useless to end user.
    Example:
    self-insert ''
    'begin;end'
  2. Group together different keybindings to the same command. Merge char sequences that shown as the same key.
    Example:
    Five duplicate nextd-or-forward-word ALT - Right Arrow
  3. Fix obvious key name errors:
    Example:
    execute r (should be \r, or simply remove this line as the user probably doesn't know how to input \r)
    backward-delete-char � (incorrect handling of backspace)
    end-of-line ~ (incorrect handling of control sequence)
@floam
Member
floam commented Aug 23, 2016

I agree. It's hard to read that and understand what you need to press to cause what.

We could perhaps leave the raw commands in a tooltip, else able to be toggled and/or with a "copy raw bind command to clipboard" button. Non-developers still might use that as a launching point to modify bindings, not just for help discovering them.

@floam
Member
floam commented Aug 23, 2016 edited

Wow - I just noticed that we actually already have some kind of toggle action I never before noticed. Clicking "Right Arrow" flips it to right in a way that is really confusing.

This should be made obvious with some kind of hint as to what clicking will do and that you can click, by changing the pointer and maybe displaying some indication. The font could be sans-serif for the friendly text and monospaced for the raw commands.
It should also probably toggle just the portion changed, removing the other friendly variant and placing the command variant and not add it after a line break as it's unclear exactly what part can be swapped.

Maybe the fixes for the above you listed could entail a better modality altogether.

Another thought is that fish_key_reader could benefit from having access to the same simple names.

@floam
Member
floam commented Aug 23, 2016

.. and that weird toggling only seems to apply to the bind -k commands (I think), not others that were simplified.

@floam
Member
floam commented Aug 23, 2016 edited

Marking bug and enhancement as in the scope of this issue there are clear bugs outlined above and also proposed enhancements. 👍if you'd like to take a swing at improving the experience and fixing stuff!

@jinliu
Contributor
jinliu commented Aug 23, 2016

Wow - I just noticed that we actually already have some kind of toggle action I never before noticed. Clicking "Right Arrow" flips it to right in a way that is really confusing.
This should be made obvious with some kind of hint as to what clicking will do and that you can click, by changing the pointer and maybe displaying some indication.
The font could be sans-serif for the friendly text and monospaced for the raw commands.

For that purpose, I think it's better to show raw commands (instead of the -k keyname). E.g.
nextd-or-forward-word ALT - Right Arrow
(click some down arrow to expand into:)
bind \e\eOC nextd-or-forward-word
bind \e\e[C nextd-or-forward-word
bind \eO3C nextd-or-forward-word
bind \e[3C nextd-or-forward-word
bind \e[1;3C nextd-or-forward-word
bind \e[1;9C nextd-or-forward-word

@floam
Member
floam commented Aug 23, 2016

Yep, totally.

@faho faho added this to the next-2.x milestone Aug 23, 2016
@faho
Member
faho commented Aug 23, 2016

Fixed by merging #3326.

@faho faho closed this Aug 23, 2016
@krader1961 krader1961 modified the milestone: fish 2.4.0, next-2.x Sep 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment