help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] vim mode changes


From: Chet Ramey
Subject: Re: [Help-bash] vim mode changes
Date: Mon, 14 Aug 2017 11:30:40 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 8/10/17 11:25 PM, Chadwick Rogers wrote:
> I found this old thread:
> http://lists.gnu.org/archive/html/help-bash/2016-11/msg00004.html
> 
> But my scenario is slightly different.  Run bash in vi-mode, type "echo
> hello world", press enter, press up arrow on your keyboard, press the home
> key to jump to the beginning of the line followed by the right arrow to the
> end of 'hello' or press the left arrow to the end of 'hello', press ctrl+w,
> the word will not delete.  Go back to the end of the line, press ctrl+w
> three times and deleting works fine all the way to the beginning of the
> line.  Adding "set bind-tty-special-chars off" to my inputrc has no effect
> on this.

This is another change resulting from readline's new implementation of the
Posix vi-mode editing standard. ^W now uses the Posix definition of word
boundaries.  You can bind ^W to its old command name (unix-word-rubout) to
get the old behavior back in addition to unsetting bind-tty-special-chars.

bind -m vi-insert '"\C-w":unix-word-rubout'
bind 'set bind-tty-special-chars off'

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]