I started to really use keyboard shortcuts when I started to use VIM. But what I dislike is that I can’t HJKL in another applications, which is tough to get over because I spent so much time learning I couldn’t use them in other applications!
There are ways to use VIM keybindings in other applications, such as Vimperator, Vimium, Eclim, etc. But the hardest is that getting VIM keybindings to function means that there needs to be support for the insert, normal modes (More here) to work correctly. And this is difficult to do in an effective manner!
So that’s why the Emacs keybindings make sense! Instead of having to try to mess around with modes, I can just use Control + Key to complete an operation. The bad part about using Control is that it is on the bottom left part of a Macbook keyboard, but I do remember that people always mentioned to me that they would remap the Caps Lock key to Control.
I am sad that I can’t switch into ALL CAPS mode (which is good to have when I’m trying to write proper SQL), but being able to control the cursor without having to move my hands to the arrow keys is something I am willing to give up. The one bad part is that these keyboards shortcuts are not always available in all programs, but it works in terminal, Chrome toolbar, and text editors! Which is really covers most of the stuff I do anyway!
The following is a summary of the keyboard shortcuts I find most important to know. Cursor is the small box or vertical line that shows where you are currently typing.
Movement
Keyboard Shortcut | Command |
---|---|
Control + A | Start of Line |
Control + E | End of Line |
Control + P | Previous Line |
Control + N | Next Line |
Control + F | Move Cursor Forward |
Control + B | Move Cursor Backward |
Control + V | Scroll Down |
Editing
Keyboard Shortcut | Command |
---|---|
Control + K | Cut From Cursor to End of Line (Cut) |
Control + Y | Paste The Text Removed By Control + K |
Control + H | Backspace |
Control + D | Forward Backspace |
Control + T | Transpose letters * |
Control + O | Insert Line Break |
* If the cursor is:
- between two letters, the two letters will be switched.
- is in a white space between two words, the two words will be switched.
Google around more to find out OSX keyboard shortcuts.