Skip to content

vi mode: ^C in insert mode doesn't work as documented #2228

Closed

Description

@vcunat

Docs say it should switch to normal mode, but it kills the line instead. I suspect overlapping keybindings don't work as expected/intended.

EDIT: I tested this on 2.2.0.

Activity

  1. faho commented on Jul 19, 2015

    @faho
    Member

    Nope, it's actually bound to 'commandline ""' i.e. clearing the commandline in both normal and insert mode. Where in the docs does it say that? Your link is to the "other features" section, where I can't find any reference to vi mode or ^C or \cc. If it says that, it's disagreeing with the code.

    Edit: Oops, there's a "Vi mode commands" section above that, which says:

    Insert mode
    [...]
    Escape or ControlC enters command mode.

    So yeah, it should be.

  2. ridiculousfish commented on Jul 19, 2015

    @ridiculousfish
    Member

    Any vi expert want to weigh in on what the right behavior should be?

  3. added this to the milestone on Jul 19, 2015
  4. vcunat commented on Jul 20, 2015

    @vcunat
    ContributorAuthor

    I tested in gvim that ^C does what's documented, and I find it very practical, as Esc key tends to be far from reach.

  5. faho commented on Jul 20, 2015

    @faho
    Member

    I just tested with ex-vi (sourceforge link) which is supposed to be a faithful vi (and is the default vi on archlinux at least) and vim: both exit insert mode. (Note: Am not a vi expert, use emacs with evil)

    So it seems like what's documented is the right behavior.

  6. pickfire commented on Jul 21, 2015

    @pickfire
    Contributor

    I notice that too, it is just different in fish_vi_mode.

  7. pickfire commented on Aug 17, 2015

    @pickfire
    Contributor

    2015-08-17-151756_564x340_scrot

    There is 2 mode indicator in the normal prompt, is this the intended feature?

  8. ridiculousfish commented on Aug 17, 2015

    @ridiculousfish
    Member

    No, that is not intended. Are you sure you don't have a custom prompt?

  9. pickfire commented on Aug 17, 2015

    @pickfire
    Contributor

    No, I am currently using the classic + git prompt.

  10. faho commented on Aug 17, 2015

    @faho
    Member

    What does type fish_prompt say? The default classic+git prompt only has the vi-mode thing in one place.

    Also, this is really another issue, please open one.

  11. pickfire commented on Aug 18, 2015

    @pickfire
    Contributor

    This only occur in when using classic + git theme, there is no problem when using sorin theme.

  12. ridiculousfish commented on Aug 18, 2015

    @ridiculousfish
    Member

    Oh, I see, classic+git has its own mode indicator. I think we can just remove that.

  13. added a commit that references this issue on Aug 18, 2015
    2b87705
  14. ridiculousfish commented on Aug 18, 2015

    @ridiculousfish
    Member

    Fixed as 2b87705. Thanks for reporting this!

  15. added a commit that references this issue on Sep 8, 2015
    f527c04
  16. locked as resolved and limited conversation to collaborators on Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions