← Back to context

Comment by kulahan

13 hours ago

I’ve read that if you’re trying to overturn a habit with a new habit, it’s best to undo whatever it is you did the old way, then redo it the new way.

So if you want to use ctrl-r, but you’re using the up key, use the down key to navigate back to a clear line, then use ctrl-r. Do it enough times and your brain will work overtime to find a shortcut (aka just doing it the new way).

Temporarily binding the up arrow in the shell to echo "Use Ctrl-R" is probably the quickest way to un-/re-learn

  • ive just done this, thanks for the suggestion:

    "Use Ctrl-R for fuzzy history, or Ctrl-P/Ctrl-N for history entries"

    (I have those bound to bindkey '^P' up-history and bindkey '^N' down-history instead of up and down arrow's "up-line-or-history" which is really annoying with multiline commands)

  • I’ve done this, nowadays asking Claude to rebind things so that I’m forced to learn. It comes with interesting side effects!

  • I learned to type `ls` properly the first time, every time, shortly after installing `sl`.