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?
Keyboard shortcuts to navigate the command line in irb
Asked Answered
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
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. –
Nicolette
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.
© 2022 - 2024 — McMap. All rights reserved.