0

I have set the default shell to bash and have

set -o vi
alias vi=vim

set in the ~/.bash_profile. I also have With this configuration - and apparently some additional special sauce my prior laptop gave me automatic key repeats when editing bash history. E.g. hitting "h" and keepign it depressed would travel leftwards in the current line as long as the key were depressed.

But on a newly configured mac the auto-repeat does not work on the set -o vi commandline. It does however work when in vi itself.

How can this be fixed in set -o vi mode?

  • What do you have in ~/.inputrc? I also guess that some unexpected behaviour is related to using .bash_profile instead of .bashrc – Aivar Paalberg Aug 21 '21 at 18:20
  • On this "newly created Mac", have you disabled key popups? I disabled those so long ago I don't remember if the h key has alternatives. – Marc Wilson Aug 21 '21 at 18:37
  • @MarcWilson For "disabling key popups" do you mean this https://apple.stackexchange.com/a/332770/55242 ? – WestCoastProjects Aug 21 '21 at 18:53
  • Yeah, that uselessness. Aside... I tested in ksh (what I normally use) and bash, and it works as the OP said with popups disabled. What does the key do in insert mode on the command line? – Marc Wilson Aug 21 '21 at 19:27
  • @MarcWilson that seems to work : would you like to make it an answer? – WestCoastProjects Aug 21 '21 at 21:40

1 Answers1

2

To have full use of repeating characters, disable Apple's press-and-hold support as detailed here: https://apple.stackexchange.com/a/332770/55242

Most likely it works in vim because vim changes the terminal mode, while bash does not.

Marc Wilson
  • 5,920