vim subshell indicator in PS1
Originally posted at saji-codes tumblr.
Update: Available as module in PS1 modules.
Quite a good idea, if you use vim’s :shell
, like I do, is to put this to your .bashrc
:
test -n "$VIMRUNTIME" && PS1="\e[30m(vim shell)\e[0m $PS1"
Without this I often ended up forgetting that I’m in vim’s subshell and trying to open files that I’ve had already opened.