DEV Community

Discussion on: How To Use Vim Mode On The Command Line In Bash

Collapse
 
brandonwallace profile image
brandon_wallace • Edited

Thank you. j and k do indeed move through the command history. I have updated the article to include the new information.

I use this a lot in my .bashrc

function hg() {
    history | grep $1;
}
Enter fullscreen mode Exit fullscreen mode

and this to run the second to last command

$ !-2
Enter fullscreen mode Exit fullscreen mode

Now I can use the j and k keys.