GitXplorerGitXplorer
y

mac-terminal-shortcuts

public
48 stars
14 forks
2 issues

Commits

List of commits on branch master.
Unverified
bdf4cfcd01a720a6c960615414784cd659ade53b

Add Alt + Backspace as alternative to deleting word before the cursor

yyangshun committed 7 years ago
Unverified
6a03139831a3778b8f1d38d540ad9738a9892aad

Minor tweaks

yyangshun committed 7 years ago
Unverified
3d4bb0dda5854434cf8b9bc3d880996e69bdc2cc

Add shortcuts! :tada:

yyangshun committed 7 years ago
Unverified
6786895555f8cc14f49c3aeb19d608d3e5e7d377

Initial commit

yyangshun committed 7 years ago

README

The README file for this repository.

Mac Terminal Shortcuts

A list of useful terminal shortcuts for macOS. Some obscure shortcuts like capitalizing words are purposely omitted.

Note: To use the Alt Key Shortcuts in macOS:

Open Terminal > Preferences > Profiles Tab > Keyboard Tab > Check "Use option as meta key"

Cursor Movement

Shortcut Description
Ctrl + E Move cursor to end of the line
Ctrl + A Move cursor to start of the line
Ctrl + F Move cursor one character forward
Ctrl + B Move cursor one character backward
Alt + F / Alt + Right Move cursor one word forward
Alt + B / Alt + Left Move cursor one word backward
Alt + Click Move cursor to clicked character
Ctrl + XX Toggle between the start of line and cursor position

Editing

Commands with "Cut" will add the cut portion to the clipboard.

Shortcut Description
Ctrl + L Clears the screen
Ctrl + D Delete character under the cursor
Ctrl + H Delete character before the cursor
Ctrl + K Cut everything from the cursor to end of the line
Ctrl + W / Alt + Backspace Cut the current word before the cursor
Alt + D Delete the word after the cursor
Ctrl + U Cut the line before the cursor
Ctrl + Y Paste the previous cut text
Ctrl + _ Undo your last key press. You can repeat this to undo multiple times
Ctrl + T Swap the last two characters before the cursor
Esc + T Swap the last two words before the cursor

History

Shortcut Description
Ctrl + P Previous command
Ctrl + R Next command
Ctrl + S Forward search
Ctrl + R Reverse search
Ctrl + O End search and execute command
Ctrl + G Abort search (restores original line)

Process

Shortcut Description
Ctrl + C Kills current task (SIGINT)
Ctrl + D Inserts an EOF
Ctrl + Z Pauses current task
Ctrl + S Stop output to the screen (for long running verbose commands)
Ctrl + Q Allow output to the screen (if previously stopped using stop output command)