0

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?)

3
  • 1
    screen doesn't read .profile for its subshells.
    – DopeGhoti
    Apr 27, 2017 at 17:41
  • Good Lord... thank you. Now to remove my palm from my face...
    – Bandrami
    Apr 27, 2017 at 17:53
  • Pleased to be of service!
    – DopeGhoti
    Apr 27, 2017 at 17:54

1 Answer 1

1

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
1
  • 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.
    – Bandrami
    Apr 28, 2017 at 0:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.