Submitted by "Just Another User" to comp.unix.shell:
Quote:> You can
> set "set showmode" in the ".exrc" file
> OR
> include "set showmode" as part of EXINIT variable
> When this is done and you are in insert mode then this is indicated at the
> bottom right hand of your screen.
Do no top-post.
Your solution is for the editor Vi, not the shell ksh as was
what "parv" wanted.
>> Submitted by parv to comp.unix.shell:
>> > i use bash as login/interactive shell, flirting sometimes w/ zsh &
>> > ksh93 w/ emacs key binding. not a problem so far. i want to be
>> > accustomed to vi binding for "personal enrichment".
>> > i find it frustrating when i couldn't tell if insert mode is in
>> > effect or the command mode. is there any way visual way -- say in
>> > $PS1, some message when mode changes perhaps via a script, etc. --
>> > to indicate the current vi mode? i don't have preferences, to learn
>> > vi key binding, among bash, ksh93, and zsh.
>> I'm more used to ksh93. After pressing <Esc> (twice, or
>> until you hear a beep), you will always be in command mode
>> (as oppsed to insert mode), just as in the Vi editor. You
>> will need to press <Esc> twice if you just managed to press
>> <Ctrl>-V in insert mode.
>> In ksh93, you also have ${.sh.edmode}, which will be <Esc> when
>> the shell is in Vi-mode insert-mode. I doubt that you can use
>> this variable to change your prompt though, because the prompt
>> is displayed just after exiting from the last command that you
>> executed, and just before going into insert-mode again. Anyone
>> is welcome to prove me wrong, of course.
>> --
>> Andreas K?h?ri (on a slow news feed)
>> ----------------------------------------------------------------
>> NetBSD: En Vax i handen ?r b?ttre ?n tio p? skroten.
>> http://www.netbsd.org/
--
Andreas K?h?ri
----------------------------------------------------------------
NetBSD: Because you're worth it. http://www.netbsd.org/