bug-readline
[Top][All Lists]
Advanced

[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

Hello,

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{}
$endif

# 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.

Details 
(http://kvakaren.blogspot.com/2010/11/gnu-readline-vi-mode-visualization-2.html).
Source patch 
(http://aur.archlinux.org/packages/readline-vi-mode-changed-hook/readline-vi-mode-changed-hook/vi_mode_changed_hook.patch).
I've created archlinux PKGBUILD
(http://aur.archlinux.org/packages.php?ID=41676).

Do you think my patch could be integrated ?

Regards,
Miroslav Koskar



reply via email to

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