Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

grantm (164)

grantm
  (email not shown publicly)
http://www.mclean.net.nz/

Just a simple [cpan.org] guy, hacking Perl for fun and profit since way back in the last millenium. You may find me hanging around in the monestary [perlmonks.org].

What am I working on right now? Probably the Sprog project [sourceforge.net].

GnuPG key Fingerprint:
6CA8 2022 5006 70E9 2D66
AE3F 1AF1 A20A 4CC0 0851

Journal of grantm (164)

Monday March 28, 2005
10:09 PM

Ctrl-Backspace

[ #23901 ]

Here's a handy tip for Linux users: I have just learned that Ctrl-Backspace can be used for 'delete word' in many apps.

At the bash command prompt, Ctrl-W deletes the word to the left of the cursor (maybe an emacs convention?). A number of other applications support this keystroke but recently I've found that OpenOffice and Mozilla both close the current window in response to Ctrl-W. I found in the OpenOffice docs that Ctrl-Backspace performs the desired function and lo it works in Mozilla too!

The alternative of using Shift-Ctrl-Left to highlight the word and then Delete, has the side effect of copying the highlighted word onto the clipboard. This is a particularly bad side-effect when the whole point of deleting the word is to replace it with the contents of the clipboard :-(

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • At the bash command prompt, Ctrl-W deletes the word to the left of the cursor (maybe an emacs convention?).
    Exactly. readline(3) documents these under DEFAULT KEY BINDINGS. What I found interesting is that there are VI Mode bindings. I never knew about that while I was using Vim. I did notice that when I started using Emacs that my CLI navigation under bash became much more proficient.

    -- Douglas Hunter
  • Selecting a word clears the selection, not the clipboard. The two are independent. This is a mistake almost everyone using X11 makes – it took me a long time to understand it.

    The confusion is probably created by middle-click pasting the clipboard contents in many apps (but not all) when there is no current selection, as well as some applications such as xterm offering no way to copy to the clipboard. So in practical use the line is quite blurry.