So, I don’t know how I missed this for so long but you can use your favorite Vim commands in your bash prompt! Man, I wish I knew this when I was getting stated with server management. And it’s really simple to enable, just add
set -o vi to your .bashrc file. Then, when you source your .bashrc or bounce your session you start off in Insert mode, just hit esc to enter normal mode. Use “
bind -P” to see what bindings are set and available (make sure you’re in Normal mode first by hitting esc before hitting enter). There’s a lot that isn’t available in bash, but enough that I now have another area I don’t need my mouse.
Yes, I’ve recommitted to use Vim because I wish I had done this back when I started programming! I’ve easily spent more time trying out different editors/IDEs and fighting with them to do what I needed than actually doing work.
Is it wrong to admit I’ve using VI and VIM since the 90’s when I ran Slackware?
Good tips! Just don’t get your Modes mixed up…
Not at all wrong! Lol. It’s good that you’ve been using Vi(m) that long, means you probably have a lot of knowledge about best practices and bad habits!
And no doubt about keeping modes straight! But just goes to show the power of a good editor.
As a side note, I finally think I’ve gotten my head around the main difference between Vim and EMacs: Modal vs Modifier based control/interface. I guess which is better depends on what feels the most comfortable in how you interact with a computer. And what I’ve found over the years is that even though a vast majority of how I interact with a computer is through a modifier based paradigm, modal feels like a more natural workflow to me. In fact I think I’ve even found how to use a MacOS based system almost entirely with Vim style keyboard commands! The more I use Vim, the more I wish I could use my computer with Vim commands - and I found a Vim talk where the presenter manages to not use his mouse, even when he’s browsing to websites and navigating Finder!
The axiom of “Vim can do anything” really is true it seems!
Many, if not most of, the old programs/utilities are simple and powerful for a reason. They knew what they wanted, and were clever enough to understand how far things could be taken, then went for it.
There’s a short video or documentary on one of them, I honestly don’t remember which as it’s been awhile. I think it was either awk, grep or sed. It showcased the thought process of things back in the day and how something simple can be made quite powerful.
I recently learned that Vi descended from awk, sed, and qed. It’s really amazing the story of some of the older tools and protocols. I’m going to see if I can find that documentary now, sounds like something I’d like! Thanks for letting me know it’s out there!