Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Also, without some sort of indicator, Vim’s modal design is awkward here—it’s very easy to forget which mode you’re in.

With `bash`, you can show which mode you're in by putting this in your `~/.inputrc`:

    show-mode-in-prompt on
It makes your prompt look like this:

    [foo@bar ~]$ # before turning it on
    @[foo@bar ~]$ # after
    @[foo@bar ~]$ set -o vi
    (ins)[foo@bar ~]$ # and after I press esc:
    (cmd)[foo@bar ~]$
Customize these with `emacs-mode-string`, `vi-ins-mode-string`, and `vi-cmd-mode-string`.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: