Question: Hi I am using gdb version 7.5. Can someone tell me how I can get the vim keystrokes to work inside the gdb? The up and down arrow keys work for history but I want the k and j to work similar to when I am in a bash shell and have things set as set -o vi from the shell then my vim keystrokes work for command history. I used to have this set up using gdb in a previous linux instance. Currently running ubuntu 13.04.

Answer: 
gdb uses readline. So you just need to put the following command into `~/.inputrc` to turn the editing mode to vi.

```
set editing-mode vi

```

Note: all programs that use readline will be affected by this setting this includes bash.
Over in [this question about ndk-gdb](https://stackoverflow.com/questions/15770233/vi-bindings-in-ndk-gdb) I learned that `C-M-j` will cause gdb to enter vi mode. I tried that with gdb 7.4.1 and it worked, but I don't know about gdb 7.5. (Note: `C-M-j` means "Alt-Ctrl-j" for those not used to emacs nomenclature or "Esc Ctrl-j" if you don't have an Alt key.)