[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] gv in vi mode with multiple lines
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] gv in vi mode with multiple lines |
Date: |
Mon, 02 Jul 2012 09:45:30 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20120601 Thunderbird/13.0 |
On 7/1/12 8:04 AM, Peng Yu wrote:
> Hi,
>
> When I type a command that spans multiple lines. For example, I type
> the following incomplete command,
>
> ~$ echo 'a
>> b
>
> I then type ESC, gv. The vim window opened only include the 2nd line.
> The vim window should include both lines. Is there a way to configure
> the vi mode to do editing more intelligently?
Readline only works a line at a time. If the calling application needs to
build commands of more than one line, like bash, it constructs them from
multiple calls to readline. Bash does its best to retrieve mult-line
commands from the history list and allow the `v' command to edit them, but
it can always be made better.
> BTW, I don't find where the description of the gv usage. Could anybody
I'm not sure what you're trying to do with the `g, since it's not bound to
anything. The `v' command is described in
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html#tag_20_117_13_03
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/