Readline —- I’m sometimes amazed at the number of relatively seasoned developers who don’t know simple commands like ctrl-r. This one really pays off because almost all shells and repls like ipython or the mysql client implement it.
Sample cheat sheet: https://readline.kablamo.org/emacs.html You don’t have to learn it all, but mastering the basics like moving to the end/beginning on the line, moving/deleting by word, yank, history search and the like will pay off handsomely.
Huge fan as well. What I really want is a terminal which has Vim's "normal mode" keybindings for scrolling back the buffer, selecting, find/replace... but then anytime you go to "insert mode", you get Readline. Best of both worlds.
I think that's Neovim's terminal mode. I personally don't use it because I use a tiling window manager, so it's easy to launch another terminal wherever I want and I'm happy with the key bindings. But some people swear by terminal mode.
Nice! I’ve been at this game for a while and ctrl-r must have slipped right past me till now. I’ve regularly do ‘history | grep ___’ but ctrl-r looks like a far better solution.
This changes readline behavior from emacs to vi. This, along with "set -o vi" in bash, are really handy (though can be frustrating for others if you ever share a keyboard pair programming).
The origin of those shared commands isn't from readline, but rather from emacs key bindings that made it into both readline and MacOS: https://jblevins.org/log/kbd
Comments (563) 147 threads
Show all comments
Showing thread 5 of 147
Sample cheat sheet:
https://readline.kablamo.org/emacs.html
You don’t have to learn it all, but mastering the basics like moving to the end/beginning on the line, moving/deleting by word, yank, history search and the like will pay off handsomely.
https://github.com/junegunn/fzf
I’m a vim person, but I feel like the modal workflow does not work well at all in a shell.