4 ms·
Cool Unix Hacks For Fun and Productivity
- mschuster91 13y agoActually, 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!
- qworty 13y agoActually 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
- tsahyt 13y agoYou 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.
- zenlikethat 13y agoAh 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!
- tokanizar 13y agoOr you can consider using "tig" (http://jonas.nitro.dk/tig/manual.html http://jonas.nitro.dk/tig/manual.html) if you really prefer using a command-line style.