Suppose that I'm writing some text and the caret is in the middle of a word. I would like to be able to select that word without using my mouse. (Using the mouse, simply double-click on the word.)

I have found the following, but it's kind of clunky:

1) Ctrl + Left arrow to go to the beginning of the word

2) Ctrl + Shift + Right arrow to select the whole word

Is there a better way of doing this?

link|improve this question

75% accept rate
1  
I think this is the simplest way to do it without a mouse. It's only 2 steps. – bwall Oct 14 '11 at 14:57
It depends on what program you're in. Many editors would have a keystroke for select current word. – Julian Oct 14 '11 at 15:01
@Julian: I'm mostly in Google Chrome, I guess. – Justin Oct 14 '11 at 15:29
feedback

2 Answers

up vote 2 down vote accepted

On OS X, create a file ~/Library/Keybindings/DefaultKeyBinding.dict with the following content:

{
    "^w" = (selectWord:);
}

If the file already exists, add the second line above within its top-level braces.

Now you can press ^w (Control-W) in any native application (i.e. not Firefox, Eclipse, etc.) to have it select the current word.

You can customize the shortcut, ^ is Control, ~ Option, $ Shift, @ Command.


Some applications include menu items for this action. TextMate, for example, uses the ^w shortcut for Edit » Select » Word by default.

link|improve this answer
This works with Google Chrome. – Daniel Beck Oct 14 '11 at 17:53
feedback

There is a better way. AutoHotkey.

http://www.autohotkey.com/

Or if you are in Visual Studios, Ctrl W selects the whole word.

link|improve this answer
How'd you configure AutoHotkey to make this work? – Daniel Beck Oct 18 '11 at 17:53
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.