One of the features of macOS is it natively supports emacs style text editing & navigation shortcuts. That is you can use these shortcuts irrespective of the editor you are using.

Here is the list

Ctrl A -> Move to beginning of line

Ctrl E -> Move to end of line

Ctrl N -> New Line

Ctrl P -> Previous Line

Ctrl M -> Carriage return

Ctrl H -> Delete backward

Ctrl D -> Delete forward

Ctrl F -> Move one character forward

Ctrl B -> Move one character backward

Ctrl K -> Delete line from current cursor position

Ctrl T -> Transpose cahracters around cursor

Ctrl M -> Transpose cahracters around cursor


Productivity boost

In the first glance this shortcuts may seem trivial, but they are very effective. If you do a lot of typing then using this shortcuts will definitely save a lot of time.

For example instead of always reaching out to Backspace you can always use Ctrl H.

Works in Terminal

The added benefit is these shortcuts work perfectly well in Terminal no matter what shell you use

Identical behaviour in all editors

Since these shortscut are natively supported they work exactly same in all editors

Pro Tip:

Many emacs users map Caps lock key to control key. It becomes very easy to use the above mentioned shortcuts as it is easily accessible to left pinky finger. Also you rarely require Caps lock key, so it can be utilised for somthing that is required frequently. Here is how you can do it.