Hacker News new | past | comments | ask | show | jobs | submit login
Cool Unix Hacks For Fun and Productivity (nathanleclaire.com)
12 points by zenlikethat on Nov 3, 2013 | hide | past | favorite | 5 comments



Or you can consider using "tig" (http://jonas.nitro.dk/tig/manual.html) if you really prefer using a command-line style.


Actually if you really like the vim keybindings you can set your bash to vi mode. That way with escape shift+i you get to the start of the line.

Or if you like to keep the emacs keybindings in your terminal (yep emacs). you could always do ctrl+x e this opens op your $EDITOR with the current text of the command line. Exit the editor and the text will be piped to bash. (Maybe not the correct terminology, but it gets executed by bash)

add this to your ~/.bashrc set -o vi


Ah yes, these can be quite useful. For most use-cases, however, I prefer the emacs keybindings as that's just how I learned (and the lack of a NORMAL-INSERT-VISUAL mode indicator can be a bit confusing).

I love CTRL-X CTRL-E!

Thanks for your feedback!


You can also add this line to .inputrc which will give you vim keybindings in everything that uses the readline library (for instance, ghci, ipython or gdb). However, I found that it breaks a few things in gdb though.


Actually, the -p flag works for git commit and even for git checkout - the latter is incredibly useful if you want to revert just a little chunk!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: