Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Keyboard navigation tips in the Terminal UNIX
Not sure that I have seen this one before - I discovered it quite by accident. Typing option-G in the terminal will move the cursor back one word and option-F will move it forward one word.

This come in particularly handy when you have entered a line of text in the terminal that has wrapped to several lines. Try the old option-click on that and see what happens ... it reverts the command back some distance into the history as far as I can tell. Not sure exactly what happens, but I do know it deletes what you had typed in. Up until discovering the above key commands I was using the arrow keys to go back and forth.

If anyone else knows any more terminal key cmds - lets hear them....

[Editor's note: I thought we had published something on this subject before, but I can't seem to find it this morning ... so hopefully, this isn't a repeat hint!]
    •    
  • Currently 3.00 / 5
  You rated: 3 / 5 (4 votes cast)
 
[7,924 views]  

Keyboard navigation tips in the Terminal | 3 comments | Create New Account
Click here to return to the 'Keyboard navigation tips in the Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Option-Click
Authored by: basskiwi on Jul 11, '02 09:27:23AM
All this does is move the cursor around in the terminal (if you have it turned on the prefs). Open a file in vi and give it a go. It'll go back in the history from the commandline because terminal send the command line the equivalent of an up arrow (which moves you through the history). Crtl-a in any terminal will take you to the begining of the line. For lots of other options type bindkey at the terminal.

[ Reply to This | # ]
bindkey
Authored by: bluehz on Jul 11, '02 09:39:12AM

Thanks for the info on bindkey - I thought it had something to do with bindkey - but was not sure exactly what.



[ Reply to This | # ]
These are emacs keys, here's some more:
Authored by: TTop on Jul 12, '02 02:53:13PM
Many terminal shells have default emacs key bindings, including tcsh (the default OSX shell) and bash. Here's some more terminal movement keys:
ctrl-a   beginning of line
ctrl-e end of line
opt-f forward word
opt-b backward word
ctrl-f forward character
ctrl-b backward character
ctrl-d delete character
ctrl-l clear screen
pageup page up in buffer
pagedwn page down in buffer
okay, the last few aren't technically emacs keys, but you get the idea...

[ Reply to This | # ]