I know that I can use CTRL+ALT+J in gdb to get vim keybindings but how do I get gdb to start in vi mode by default ?
1 Answer
Put set editing-mode vi in a .inputrc file in your home directory. bash, gdb, and other programs using readline will start in vi-mode by default.
Side note unrelated to gdb :
zsh does not use readline as a line editing library but zle and therefore you will need to set bindkey -v or set -o vi in your ~/.zshrc :
(https://unix.stackexchange.com/questions/373322/make-zsh-use-readline-instead-of-zle)