2008年7月1日星期二

Shortcut Keys

In Mac's text input area, for example Safari's location bar, Text editor etc.,
even some of them work well in Terminal input:

Ctrl + D: delete the next character
Ctrl + A : Go to the beginning of the line you are currently typing on
Ctrl + E : Go to the end of the line you are currently typing on
Ctrl + H : Same as backspace.
Ctrl + Y : to paste it (as in delete and copy) all text in front of the cursor.
Ctrl + U : Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + K : Clear the line after the cursor.
Ctrl + Y: paste the the last line deleted with Control-K
Ctrl + T : Swap the last two characters before the cursor.
Esc + T : Swap the last two words before the cursor.

Linux shell shortcut keys or in the Terminal.app in OS X:

Ctrl + R : Let you search through previously used commands.
Ctrl + D : exit a terminal, same as typing `exit`
Ctrl + L : clears the screen, same as `clear`
Ctrl + W : Delete the word before the cursor.
Ctrl + C : breaks/cancels an ongoing operation
Ctrl + Z : pauses (stops) an ongoing operation. Type `fg` (foreground) to resume it or `bg` (background) to continue the process in the background
Alt + F : Move cursor forward one word on the current line. (have no idea how to make it work in Mac)
Alt + B : Move cursor backward one word on the current line. (have no idea how to make it work in Mac)

Option-G: will move the cursor back one word (ONLY for Mac, and does not work in "screen")
Option-F: will move it forward one word. (ONLY for Mac, and does not work in "screen")

没有评论: