Welcome to MSDN Blogs Sign in | Join | Help

Sara Ford's WebLog


My adventures embracing open source on CodePlex and at Microsoft

News

Did you know... Ctrl+W selects the current word - #032

Press Ctrl+W at any location on the word to select the entire word.  You can have the cursor at the end of word and still have it select the current word (instead of the proceeding whitespace.) 

Ctrl+W Selects Current Word

If the cursor is in the middle of whitespace (need at least 2 spaces), that whitespace will be selected.

Technorati tags: ,
Posted: Friday, September 07, 2007 3:00 AM by saraford

Comments

Rujith Anand said:

Do the same in Word 2003, it will close the document :)

# September 7, 2007 6:30 AM

BinaryJam said:

Not in my version, hated that, I made it close current tab instead.  Ctrl-f4 is just so far away.

Too much time in adobe.

# September 7, 2007 8:07 AM

Jason Haley said:

# September 7, 2007 10:16 AM

Jason Haley said:

# September 7, 2007 10:19 AM

MattyT said:

I avoid that keypress for word selection because, as other have said, it closes the current document in many applications (Firefox, Notepad++ and every Mac application!).  

Ctrl + Shift + Right/Left or double-clicking does the job perfectly adequately for me.

# September 7, 2007 10:59 PM

Steven Harman said:

For those using Resharper... Ctrl + W takes it to the next level and actually extends the selection block-by-block. Meaning, the first time you hit that keystroke it will select the current word. Hit it again and it will extend the selection to include elements in the surrounding block. Pressing it again will further extend the selection to include the next surrounding block. And so-on...

This makes it very quick to select the current word, object, line, code block, etc...

# September 11, 2007 10:48 AM

Eyball said:

I tried Ctrl-W right here and it closed my browser (Firefox) :(

Ctrl + left click does the job enough for me.

After VS's support for this being pointed out to me after years of tedious double-clicking, I really miss it in other apps.

# September 12, 2007 10:24 AM

Visual Studio 2008 ワンポイント said:

単語の任意の場所で Ctrl + W キーを押すと、その単語全体が選択されます。カーソルを単語の最後に置いた場合も、後の空白ではなく現在の単語が選択されます。 スペースが 2 つ以上続いていて、空白の中間にカーソルが置かれている場合は、その空白が選択されます。

# July 13, 2008 11:37 PM
New Comments to this post are disabled
Page view tracker