4 ms·
Wow, I just saw this nugget in one of the comments: VI mode for the standard Terminal. Add "set -o vi" to your profile and you get access to same modality and
by tristian 15y ago
Wow, I just saw this nugget in one of the comments: VI mode for the standard Terminal.
Add "set -o vi" to your profile and you get access to same modality and commands of VI. Damn, I wish I knew about this option earlier.
- spacemanaki 15y agoNote that I think that's a Bash thing, and the default is Emacs-style bindings (C-a, C-e, C-p, C-n) which include C-r for reverse interactive search of the history. I use that every day, a dozen or more times.
- fkcek 15y agoMy favorite is C-t to correct typos like 'liek' instead of 'like', I put the cursor between the e and the k and i press C-t.
- graywh 15y agoIt's actually a Readline thing.
- spacemanaki 15y agoYeah, that makes sense. Still, my point was that it's not specific to Terminal.app, so someone on another Unix would probably find it useful.
- CountSessine 15y agoSomething I've always wondered though - did emacs take them from readline or did readline take them from emacs? How old is readline? Where did all of those C-a, C-e, etc conventions come from?
- mturmon 15y agoThey came from emacs. Readline is now around v6, readline v2 seems to have been from the mid 1990s. There is a smaller set of standard commands for killing (C-h for char, C-w for word, C-u for line) which are used in many terminal apps. They are orthogonal to emacs, and probably about as old (1970s).
- spudlyo 15y agoThose emacs style editing commands actually came from TECO in the 70s. Crazy that those editing commands are hardwired into my brain nearly 40 years later.
- bittersweet 15y agoThis one is not OSX specific though. I've tried it and can not get used to it even though I'm a VIM user at heart. I think not seeing the mode I'm in was tripping me up.