|Subject:||Re: [Help-nano] Color Syntax Highlighting on Solaris 8 shows up as white and grey|
|Date:||Wed, 18 Apr 2007 01:51:41 -0400|
If as you say the behaviour is different under different terms this may not be of help, however with bash under Linux and Solaris and using PuTTY (emulation = xterm), I can skip words in a command line with Ctrl+Right/Left using the following key bindings added to my .bashrc, regular arrow keys still only advance/retreat one char at a time.
#### Key bindings for bash
bind '"\x1b\x4f\x43"':forward-word # Ctrl + Right - advance 1 word
bind '"\x1b\x4f\x44"':backward-word # Ctrl + Left - go back 1 word
bind '"\xff"':backward-kill-word # Alt+Bksp - kill last word
bind '"\e[1~":beginning-of-line' # Home - Move Beginning of Line
bind '"\e[4~":end-of-line' # End - Move Beginning of Line
bind '"\e[3~":delete-char' # Delete - Delete a char
-GOn 4/17/07, David Ramsey < address@hidden> wrote:On 4/17/07, Garth Dahlstrom <address@hidden> wrote:
> I should mention that ctrl+left and ctrl+right just go left and right
> 1 char with the setup below using PuTTy...
Thanks for the info, but that's actually how they're supposed to work.
This is (a) so that you can hit a control character sequence, and then
move the cursor without letting go of the Control key, which some people
find useful; and (b) because I figure that nano should work the same way
under both X terminals and the console, and I have yet to find a console
that can distinguish between [arrow key] and Ctrl-[arrow key]. I do
wish that wasn't the case...
> I guess those key combos only work under xfce in Linux like the
> release note said.
And, as it turns out, under KDE's konsole, which uses the same escape
sequences for Ctrl-[arrow key], but doesn't seem to generate anything
for Shift-[arrow key]. They may also work under gnome-terminal, since
it uses the same underlying library as Xfce's Terminal, but I haven't
tested it because I'd have to build all of GNOME before I could.
--- == __/ t.O ==--
|[Prev in Thread]||Current Thread||[Next in Thread]|