I have set -o vi
in my ~/.profile, and it works fine on the regular console and under Tmux. But when I run Screen, if I press Escape or ^[, I get a visual bell, the next key I press seems to get eaten by something, and then I'm still in Insert mode in Bash. How do I tell Screen to pass the ^[ on to the shell? (Or, alternately, is there something I can do in .inputrc that will allow me to use a different key combo to enter command mode?)
1 Answer
If you switch to vi-editing mode via set -o vi
in your .profile, this won't be passed into the screen's shell, because the screen's shell isn't a login shell and thus doesn't read .profile.
You need to put the following into your .inputrc
set editing-mode vi
-
Thank you! I'm embarrassed that the answer was so stupid. For any lurkers, I'll add that you can also set in screenrc
shell -$SHELL
, which makes screen subshells be full login shells.– BandramiApr 28, 2017 at 0:31
screen
doesn't read.profile
for its subshells.