Did you know… How to hide the Quick Find / Quick Replace window after the first search hit? – #073

Let’s say you are searching for some text, and you know about F3 and Shift+F3, so you want the Ctrl+F Quick Find or the Ctrl+H Quick Replace window to disappear after the first search.

Go to Tools – Options – Environment – Find and Replace page, and check the Hide Find and Replace window after a match is located for Quick Find or Quick Replace.

option to hide find and replace window

It’s funny to be wishing everyone happy halloween in the middle of summer (at the time of this writing), but Happy Halloween!!! from 3 months ago!

Happy Halloween with 3 ghosts

(my ghost drawing is the one on the left)

Did you know… you can use Ctrl+H to bring up the Quick Replace Window? – #072

Press Ctrl+H to pop up the Quick Replace window.  The command is Edit.Replace, in case your keybindings are different.  You’ll need to press the Replace or Replace All button to invoke the find and replace. 

Additionally, you can customize your find and replace experience by expanding the Find options chevron control.

Quick Replace Window

Did you know… You can bookmark all of your Quick Find results? – #071

It’s funny, when i was writing up this tip, i started at the Find and Replace window trying to figure out where the option was to bookmark all of the results.  Finally, it jumped out at me.  =) 

Bookmark all button on Quick Find window

If you hit Bookmark All instead of Find Next, bookmarks will be dropped at all the found locations.  In the picture below, I did a search for "true" in the current code block scope, but hit Bookmark all.

All find results bookmarked

And if you’ve accidentally bookmarked half of your code by searching for a frequently-used search term (like i did the first time i tried this), simply open the Bookmark Tool Window (View – Bookmark Window), do a Ctrl+A to select all bookmarks, and then hit delete.

Technorati tags: VS2005Tip, VS2008Tip

Going to Silicon Valley CodeCamp 2007 Tomorrow (Oct 27)

Tomorrow, I’m going to swing by http://www.siliconvalley-codecamp.com to watch my fellow Microsofties Beth Massi (VB Community) and Mahesh Prakriya (IronPython) give presentations.  Both are *excellent* presenters and I highly recommend attending one of their sessions (if not all of them!) 

Additionally, i will be giving out CodePlex swag (t-shirts and other cool stuff), so come find me.  (i would have signed up to talk but way too much going on transferring to a new team and going on a vacation back home for a family reunion and so forth.  I really need to post what 150 lbs of boiled shrimp in a "shrimp boil" looks like!)

Off to catch my flight…

Did you know… Ctrl+F3 searches for the currently-selected string without brining up the find window? – #070

Just select some text (or just have the cursor on the word you wish to search for) and press Ctrl+F3.  Ctrl+Shift+F3 will do a reverse search.

CtrlF3

Note that a Ctrl+F3 search uses the following options: 

  • is case sensitive
  • searches hidden text
  • allows for partial matching
  • does not use regular expressions

Technorati tags: VS2005Tip, VS2008Tip

Did you know… How to search within the current project or entire solution? – #068

When doing a quick find, you can select the scope of your search, including the current code block, current document, all open documents, current project, and entire solution.

Just press Ctrl+F to open the Quick Find window, and drop down the Look in to select the search scope.

QuickFindSearchScope

Recall that this search scope will also apply to the Ctrl+D search experience.

Technorati tags: VS2005Tip, VS2008Tip

Did you know… Ctrl+F does a quick find in the current document? – #066

The standard keyboard shortcut for finding text in most applications is Ctrl+F.  In Visual Studio, this kicks off a Quick Find in the current document.

QuickFindIntroduction

Quick Find will pre-populate the find what text with whatever text is selected in the editor or the word that the cursor is currently on.

Additionally, this find and replace window is actually a tool window (not a dialog), meaning that you can dock it somewhere and type in the editor with it opened.

Technorati tags: VS2005Tip, VS2008Tip

Did you know… How to complete a word via intellisense? – #065

Whenever you can invoke statement completion, you can also execute the Edit.CompleteWord command.  This command will complete a word that is partially complete with no other possibilities.  And if there are other multiple possibilities, the command will invoke statement completion.

In the below example, since Console.WriteL has not other possible matches other than WriteLine, pressing Ctrl+Space or Alt+Right Arrow will write out WriteLine.

Completing a word

Technorati tags: VS2005Tip, VS2008Tip