James Lee

Must know key bindings for developers on Mac OSX


Please put your VIM vs EMACS feelings aside for a moment. These key bindings are universal and will help you keep your fingers on the main keyboard, avoiding the need to lift your hands for the home or arrow keys. What’s great is that these bindings work in the shell, in your editor and even apps like google docs. This is all because OSX respects the EMACS bindings natively and actually reserved the Ctrl key for this purpose; vs in Windows where the Ctrl key is used by the application and the OS.

Ctrl + p: next line

The Ctrl + p key binding allows you to move the cursor to the previous line. This is especially useful when you’re navigating through text or code. You can use this in various applications:

Ctrl + n: previous line

The Ctrl + n key binding allows you to move the cursor to the next line. This is helpful for quick navigation without leaving the home row.

Ctrl + k: kill line from cursor to end

The Ctrl + k key binding deletes the text from the cursor position to the end of the line. It’s a quick way to clear text without having to select it.

Ctrl + a: move to beginning of line

The Ctrl + a key binding moves the cursor to the beginning of the current line. This is great for quickly jumping to the start without using the arrow keys.

Ctrl + p: move to end of line

The Ctrl + e key binding moves the cursor to the end of the current line, allowing you to quickly get to the end of a line of text.