[Top][All Lists]

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

[Bug-readline] vi mode visualization

From: Miroslav Koškár
Subject: [Bug-readline] vi mode visualization
Date: Sat, 6 Nov 2010 00:57:01 +0100


while using the VI editing mode it is very handy to know in which mode
actually readline is.
Feature request would be to provide means to make visualization of
mode possible.

Possible indicators then could be:
- window title
- prompt
- cursor color

I've created a patch against readline 6.1 to provide such functionality.
I've extended configuration to contain e.g.

# prompt format for command mode
set vi-command-prompt \001\033[1;37m\002{}\001\033[0m\002

$if python
    set vi-command-prompt \001\033[1;37;41m\002>\001\033[0m\002{}

# vi mode changed script
set vi-mode-changed-bin /home/mirci/.inputrc_vi_mode_changed

* set vi-command-prompt {VALUE}
This sets the prompt in COMMAND mode to VALUE.

* set vi-insert-prompt {VALUE}
This sets the prompt in INSERT mode to VALUE.

* set vi-mode-changed-bin {PATH}
This sets the executable designated by PATH to be executed when mode
changes. First parameter 'insert' or 'command' is passed to designate
the mode we're in. Note that the executable is executed synchronously
with STDIN disconnected, and STDOUT connected to the terminal device.

Source patch 
I've created archlinux PKGBUILD

Do you think my patch could be integrated ?

Miroslav Koskar

reply via email to

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