I've seen screencasts where users are running irb and as they write text they jump to the beginning/end of the line and beginning/end of words. What are the keystrokes used to do this? Does it depend on the shell that's being used?
Asked
Active
Viewed 2,717 times
2 Answers
8
Ctrl + A => Move to beginning of line
Ctrl + E => Move to end of line
These are readline commands
Here is a cheatsheet you may find helpful in general

Moiz Raja
- 5,612
- 6
- 40
- 52
-
Emacs keyboard shortcuts are really handy to learn. I just realized today that some of them work on OS X Lion's own native Cocoa apps, such as Mail.app too. – d11wtq Oct 20 '11 at 13:50
6
Those are readline shortcuts. Some of the shortcuts I regularly use:
Ctrl + a => End of line
Ctrl + e => Start of line
Ctrl + l => Clear screen
Ctrl + k => Cut text from cursor position till end of line
Ctrl + u => Cut text from cursor position till start of line
Ctrl + y => Paste text that was cut using above two shortcuts
Ctrl + d => Delete a letter after cursor
Ctrl + h => Delete a letter before cursor
Meta + d => Delete the word after cursor
Meta + f => Move cursor one word forward
Meta + b => Move cursor one word backwards.