from How to move the cursor by word in command line of tcsh I know how to move cursor by word in tcsh, but they not easy to use, so can I set a shortcut on command line for example, when I use Ctrl+leftarrow, it actually works as Esc f?
Asked
Active
Viewed 977 times
0
-
Try these: http://www.csc.fi/english/pages/data-services/linux_basics/tcsh – Nehal J Wani Dec 05 '12 at 18:00
-
Hey, thanks. Just first type Esc, then type f, feels like strange. would be nice like in bash, Ctrl+f for moving by word. It's a shell on the server not easy to change. Big thanks anyway. – wiswit Dec 06 '12 at 21:19
1 Answers
1
To see a list of pre-defined key-bindings, visit:
http://www.csc.fi/english/pages/data-services/linux_basics/tcsh
To see a list of all commands which can be used to configure key-bindings, visit:
http://www.rohidekar.com/sridharsarnobat/mediawiki/index.php?title=TCSH_Key_bindings
Example: (Write this in your ~/.tcshrc)
bindkey '^[^[[C' forward-word
bindkey '^[^[[D' backward-word
This will bind the alt-right with forward-word and alt-left with backword-word.
To map to a different keyset, just run cat
and hit enter. Hit the key-combination (in the above example, right-arrow and left-arrow), record the strings that are echoed back, and use these as the key combinations to bind.

Nehal J Wani
- 16,071
- 3
- 64
- 89
-
thanks! there is also a thread here that I didn't know before: http://stackoverflow.com/questions/1099507/how-can-i-bindkey-ctrl-left-to-word-left – wiswit Dec 08 '12 at 15:39