News for hackers. Stuff that matters.
Re:Ask HN: What are your favourite programming shortcuts by fuzztester on Monday April 01, 2024 @12:37AM (#39890958)
If you're a vi(m) user on a *nix OS, running:

$ set -o vi

at the (ba)sh prompt ($ by default), enables vi-mode command-line editing. (The default is emacs.). You are initially in append mode on the current command line. Now you can do ESC to go to command mode, then use k and j to move up and down respectively in the command history, b and w to move backward or forward, and can use many other vi(m) movement and editing commands on the history lines, including/ and n to search for patterns. Been using this since early days of using Unix. Invaluable productivity aid.

There are no comments on this comment yet.