mainThe GNU Readline library - Support: sr #109361, Default mode in vi and behavior of...

 
 

sr #109361: Default mode in vi and behavior of Ctrl+C

Submitter:  None
Submitted:  Tue 25 Jul 2017 11:28:48 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  1 - Wish Status:  Postponed
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 17 Aug 2017 03:41:25 PM UTC, comment #1: 

1. vi mode always starts in insertion mode, since that's what Posix requires. There's currently no option to change this.

2. You could bind "\C-c" to "vi-movement-mode" in the "vi-insert" keymap, but you'd have to disable signal handling in insert mode, and I don't think such an option is worth the implementation cost.

Chet Ramey <chet>
Group administrator
Tue 25 Jul 2017 11:28:48 PM UTC, original submission:  

This is sort of two requests in one but slightly related.

When using vi mode it would be great if there was an option that can be set in ~/.inputrc that would let command mode be the default rather than insert mode.

Secondly, in vim you can type Ctrl+C instead of pressing Escape. It feels much more convenient as your hand can go right back to home row, but the Escape key is always quite a reach.
So I was hoping it might be possible to implement an option that can be set to allow Ctrl+C in insert mode to put you into command mode (like pressing Escape does), but once in command mode then pressing Ctrl+C will behave normally

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-17 chet StatusNone Postponed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code