moving forward and backward a "word" in terminal
Saw a post over on the System's Boy's blog about a way to setup terminal that allows you to move word to word. It was actually a re-post of the info from the textmate blog which I will link to here:
http://blog.macromates.com/2006/word-movement-in-terminal/
here are the commands (I edited them to match leopards setup)
- Open Terminal
- Open the Inspector (command-i) (inspector in leopard does not have the keyboad section so instead just open regular preferences)
- Go to the “Keyboard” section
- Add a new key binding by pressing the “Add” button
- Set “Key:” to “cursor left”
- Set “Modifier:” to “option”
- Set “Action” to “send string to shell:”
- In the text box, press the escape key to get the “\033″ text, then hit the “b” key, for “back” (In leopard it automatically escapes your \ key so you will need to copy and paste \033b into the text box rather than type it)
- Click “OK”
- Repeat this process for forward movement, using “cursor right” for the “Key:” setting, and “escape-f” for the forward key binding (Again you will need to copy and paste \033f in the text window due to the fact that leopard terminal automatically escapes your text if you type it into the box)
- Be sure to click “Use Settings as Defaults” if you want the change to be permanent (No need to do this in leopard since you should be in the preferences window anyway at this point and your settings will be default)
- Open a new terminal window scroll back in your buffer or type a multi word command and try it out by holding option and clicking left and right!
0 Comments:
Post a Comment
<< Home