Code: Select all
Add the following lines to ~/.inputrc:
"\e[1;5C": forward-word # ctrl + right
"\e[1;5D": backward-word # ctrl + left
Code: Select all
bind -f ~/.inputrc
Thanks!
Code: Select all
Add the following lines to ~/.inputrc:
"\e[1;5C": forward-word # ctrl + right
"\e[1;5D": backward-word # ctrl + left
Code: Select all
bind -f ~/.inputrc
Code: Select all
"\eOd": backward-word
"\eOc": forward-word
Code: Select all
"\e[1;5D": backward-word # ctrl + left
Code: Select all
:cq
I don't think he really means click. He means the keys. Everything else does not make sense for megapan wrote:but he's talking about ctrl-left-click and ctrl-right-click. Certainly the only thing that makes a click is the mouse?
OK, so did you really try this solution or are you just posting what you found?Atticus wrote:Hi guys, sorry I meant Ctrl+leftbutton and Ctrl+rightbutton, not mouse clicks.
So the correct inputrc entry would be:gapan wrote:BTW, the \eOd and \eOc codes are for ctrl-left and ctrl-right keys, it's just only that they work in rxvt.
Code: Select all
$if term=rxvt-unicode
"\eOd": backward-word # ctrl + left
"\eOc": forward-word # ctrl + right
$else
"\e[1;5D": backward-word # ctrl + left
"\e[1;5C": forward-word # ctrl + right
$endif
I have been using the solution I posted and it has worked great for me. I'm on Salix 14.0 with Xfce using Xfce Terminal. Unfortunately, I don't have much experience with ~/.inputrc and how it works with other terminal emulators so I can't really offer you a well engineered solution beyond what I've posted.gapan wrote:OK, so did you really try this solution or are you just posting what you found?Atticus wrote:Hi guys, sorry I meant Ctrl+leftbutton and Ctrl+rightbutton, not mouse clicks.
BTW, the \eOd and \eOc codes are for ctrl-left and ctrl-right keys, it's just only that they work in rxvt.