The Rematch – Webcast of my 101 VS tips in 55 mins via O’Reilly is now available

Earlier this week, I decided to rematch the clock to demo 101 VS Tips in 55 minutes with O’Reilly Media hosting and recording the webcast. In an earlier attempt, I missed by 15 seconds. And like the earlier attempt, if I make it, all attendees receive a free copy of my Visual Studio Tips ebook. 

The Rematch —> http://oreillynet.com/pub/e/1730

Did I make it this time? Let’s just say a picture speaks a thousand words.

stop clock with 6 seconds remaining

Actually, I demo’ed #102 tips, because I started off with Tip #0. ;-)

Since I entered hyperspace in the final 2 minutes, some folks were asking what were those last tips. The order is the same as the Channel 9 version of the talk as well.

Here’s the breakdown:

  • #97 – How to see caught exception in Watch Window
  • #98 -? You can disable the Exception assistant
  • #99 – How to use the Intellitrace DVR controls (The lack of oxygen to my brain made me call it by its old name – Historical Debugging)
  • #100 – How to open an IntelliTrace? Log (I miscalled this tip 99)
  • #101 – How to use Extension Manager / Get VS Tips in your start page. Yeah, you need to set it up in the Tools – Options – Environment – Startup.

And to that comment at 15:30, I was so tempted to say something in response, but I didn’t want to waste my precious time on Brett Favre. =P

If you want to find out more about O’Reilly’s webcasts, you can visit http://oreilly.com/webcasts/. Thanks again to O’Reilly for hosting and for providing the ebooks!

Video: 101 Visual Studio Tips in 55 minutes!

Last week I blogged about my challenge to do 101 Visual Studio Tips in just 55 minutes, and if I succeed, everyone in the audience gets a signed copy of my Visual Studio Tips book.

Let’s just say I couldn’t have planned for better drama at the end.

Get Microsoft Silverlight

Thanks to Channel 9 for hosting the video at

http://channel9.msdn.com/posts/NicFill/Sara-Fords-101-Visual-Studio-Tips-in-55-Minutes-Challenge/

Tipping against Time – Sara’s Visual Studio Tip Challenge

I’ve been known to talk fast when I’m excited in my Visual Studio presentations, and maybe even a little too fast. But what if I didn’t try to slow down? What if I actually tried to talk as fast as possible?

In a race against time, I will attempt to demo 101 Visual Studio Tips in 55 minutes for the  “What’s New in Visual Studio” session at the Visual Studio Launch Event in Mountain View, CA. And if I succeed, everyone in the audience will receive a free signed copy of my book Visual Studio Tips by MSPress.

Launch Event Details

Tuesday, June 15
1 PM – 5 PM
Microsoft Silicon Valley Campus

Registration for the event is first-come, first-serve at https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032446405&Culture=en-US

Wish me luck!

Speaking at DevDays 2010 in The Netherlands and TechDays in Belgium – Visual Studio Tips

Update:  You can watch the video of my TechDays Belgium presentation at http://www.microsoft.com/belux/techdays/2010/videos.aspx . Just search for "Sara Ford" as the speaker.

Update: I’ve updated the Visual Studio Tips Advance section for today’s talk. Cheers!

I’m speaking this week in the Hague, in The Netherlands at DevDays 2010. I’m giving several talks on Visual Studio this week, before we (speakers) head over to TechDays in Belgium for even more Visual Studio talks.

I always post all my content online before I give talks, so that those who attend my sessions do not have to rush trying to write down keyboard shortcuts or names of commands. They can simply sit back and watch.

This blog post will be updated over the next several days, as I continue to give talks. Consider this my personal wiki for the week =D

And make sure to follow Zain’s Visual Studio 2010 Tip of the Day series!

Visual Studio 2010 Tips – Part 1

Tip #0 Know your environment settings! For all my talks, I use the General Development Settings. (Tools – Options – Environment – Import / Export Settings)

Searching Tips

Tip #1 How to behold the power of incremental search

Command: Edit.IncrementalSearch

Shortcut: Ctrl+i

Tip #2 Ctrl+F3 to search for currently-selected word

Command: Edit.FindNextSelected

Tip #3 F3 to search for last thing you searched for

Command: Edit.FindNext

Tip #4 Customize what files to find in

Find In Files – Look in – Choose Search Folders

Tip #5 You can use a reg hack for customizing search results

HKCU\Software\Microsoft\VisualStudio\10.0\Find String Find=$f$e($l,$c):$t\r\n

Editing Tips

Tip #6 How not to accidentally copy a blank line

Tools – Options – Text Editor – All Languages – General, Uncheck Apply cut or copy to blank lines

Tip #7 How to cycle through the Clipboard ring

Command: Edit.CycleClipboardRing

Shortcut: Ctrl+Shift+v

Tip #8 How to use box/column selection in the editor

Command: Edit.LineUpColumnExtend, Edit.LineDownColumnExtend, Edit.CharRightColumnExtend, Edit.CharLeftColumnExtend

Shortcut: Shift+Alt+Arrow

Tip #9 How to use multi-line edit

Shortcut: Shift+Alt+Arrow (with nothing selected)

Tip #10 You can copy a file’s full path / open windows explorer from the file tab channel

Command: File.CopyFullPath

Tip #11 You can use Ctrl+. to show a smart tag

Command: View.ShowSmartTag

Tip #12 Drag and drop code onto the toolbox’s general tab

Shortcut: Ctrl+Alt+x for Toolbox, enter to insert text into Editor

Customizing Tips

Tip #13 You can insert a snippet by pressing Tab Tab

Type in snippet shortcut, then press Tab Tab

Tip #14 You can create temp or throw away projects

Tools – Options – Projects and Solutions – General, uncheck Save new projects when created

Tip #15 Change text editor font size via keyboard (Accessibility macros) or use the new Zoom control

Command: Macros.Samples.Accessibility.DecreaseTextEditorFontSize

Command: Macros.Samples.Accessibility.IncreaseTextEditorFontSize

Tip #16 How to open a file without any UI

Ctrl+/ (or whatever Tools.GoToCommandLine is bound to)

alias fo file.openfile

fo <filename>

Tip #17 Guidelines in the editor registry key hackYou’ll need an extension to do this for VS 2010. More after my Visual Studio 2010 Tips Advanced session

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Text Editor  String RBG(128,0,0) 5, 20

Tip #18 You can create a macro for your import/export settings

Tools – customize – commands – macros – drag and drop macro to toolbar

Tip #19 How to not show the start page (or have the last loaded solution open)

Tools – Options – Environment – Startup, At Startup

Tip #20 File tab channel registry hackNo longer needed for VS 2010!!! Tools – Options – Environment – Document, insert files from right

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0 key, you can create a DWORD UseMRUDocOrdering = 1

Tip #21How to show Misc Files Project to keep your files around

tools – options – environment – documents, show miscellaneous files in Solution Explorer

Tip #22 Edit project file from within IDE (unload project)

Unload project, edit project, reload project

Debugging Tips

Tip #23 You can use tracepoints to log stuff in your code

Right-click in indicator margin, select breakpoints, select Insert Tracepoint

Tip #24 How to get the find source dialog backMuch better experience in VS 2010!!! In the “No source code” window, there’s now a “browse for source” link

Solution Properties, under Common Properties – Debug Source Files, Delete Do no look for these source files edit box contents

Tip #25 You can disable the exception assistant

Tools – Options – Debugging – General, uncheck Enable the Exception Assistant

Tip #26 XML Visualizers

Visual Studio 2010 Tips – Part 2 (Advanced)

This is still a deep dive into the IDE, and not about coding or actually writing extensions.

For this talk, I’m going to cover a few must-have extensions for Visual Studio 2008, and then go straight into new features and extensions.

Here’s the list of what I’m going to cover:

Must have Visual Studio 2008 Tips

Tip #1 – Behold the power of incremental search

Tip #2 – Customize Find in Files / Registry edit to simply Find results window

Tip #3 – How not to accidentally cut/copy a blank line

Tip #4 – How to open a file without any UI

New Visual Studio 2010 features

Make sure to follow the new Visual Studio 2010 tip of the day with Zain!

Tip #5 – How to use Multi-line edit

Tip #6 – How to insert files from Right to Left in File tab channel

Tip #7 – Automatic Highlighting of Symbols

Tip #8 – IntelliSense “Sub-String” and Pascal Casing searching

Tip #9 – IntelliSense consume first / suggestion mode

Tip #10 – They Fixed the VB Smart tag bug

Press Ctrl+<period> to invoke smart tag, but now in VB, the first option in list is automatically selected, so you can simply hit <Enter> without having to first press the down arrow.

Tip #11 – New HTML and JavaScript Code Snippets

Tip #12 – Improved Outlining Collapsing / Expanding

In VS2010, you can select anywhere within the code block to collapse the region. You no longer have to click just the ‘-‘ box in the outlining margin to collapse the region.

Tip #13 – Navigate To

Tip #14 – Call Hierarchy

Tip #15 – Mutli-monitor Support

You can now drag out file tabs from the file tab channel and treat them like tool windows. Also, both these file tabs and tool windows will listen to WindowsKey + Arrow to snap to the monitor’s edge. use ctrl+DoubleClick to put either file or tool window back within Visual Studio in the “tabbed document” state.

Tip #16 – Zoom / Ctrl+Mouse Wheel

Tip #17 – The New and Improved Datatips

Tip #18 – Labeling and Sharing Breakpoints

Tip #19 – Getting Started with IntelliTrace

Tip #20 – WPF visualizer

Visual Studio Extensions

Tip #21 – How to Install Extensions

Tip #22 – Walkthrough of a few extensions

Tip #23 – Getting started writing your own extensions

MSDN Sample used in today’s talk

Tip #24 – How to search project templates

Tip #25 – Add Reference Dialog Improvements

Thank you!

Speaking at DevDays 2010 in The Netherlands and TechDays in Belgium – Visual Studio Tips

Update:  You can watch the video of my TechDays Belgium presentation at http://www.microsoft.com/belux/techdays/2010/videos.aspx . Just search for "Sara Ford" as the speaker.

Update: I’ve updated the Visual Studio Tips Advance section for today’s talk. Cheers!

I’m speaking this week in the Hague, in The Netherlands at DevDays 2010. I’m giving several talks on Visual Studio this week, before we (speakers) head over to TechDays in Belgium for even more Visual Studio talks.

I always post all my content online before I give talks, so that those who attend my sessions do not have to rush trying to write down keyboard shortcuts or names of commands. They can simply sit back and watch.

This blog post will be updated over the next several days, as I continue to give talks. Consider this my personal wiki for the week =D

And make sure to follow Zain’s Visual Studio 2010 Tip of the Day series!

Visual Studio 2010 Tips – Part 1

Tip #0 Know your environment settings! For all my talks, I use the General Development Settings. (Tools – Options – Environment – Import / Export Settings)

Searching Tips

Tip #1 How to behold the power of incremental search

Command: Edit.IncrementalSearch

Shortcut: Ctrl+i

Tip #2 Ctrl+F3 to search for currently-selected word

Command: Edit.FindNextSelected

Tip #3 F3 to search for last thing you searched for

Command: Edit.FindNext

Tip #4 Customize what files to find in

Find In Files – Look in – Choose Search Folders

Tip #5 You can use a reg hack for customizing search results

HKCU\Software\Microsoft\VisualStudio\10.0\Find String Find=$f$e($l,$c):$t\r\n

Editing Tips

Tip #6 How not to accidentally copy a blank line

Tools – Options – Text Editor – All Languages – General, Uncheck Apply cut or copy to blank lines

Tip #7 How to cycle through the Clipboard ring

Command: Edit.CycleClipboardRing

Shortcut: Ctrl+Shift+v

Tip #8 How to use box/column selection in the editor

Command: Edit.LineUpColumnExtend, Edit.LineDownColumnExtend, Edit.CharRightColumnExtend, Edit.CharLeftColumnExtend

Shortcut: Shift+Alt+Arrow

Tip #9 How to use multi-line edit

Shortcut: Shift+Alt+Arrow (with nothing selected)

Tip #10 You can copy a file’s full path / open windows explorer from the file tab channel

Command: File.CopyFullPath

Tip #11 You can use Ctrl+. to show a smart tag

Command: View.ShowSmartTag

Tip #12 Drag and drop code onto the toolbox’s general tab

Shortcut: Ctrl+Alt+x for Toolbox, enter to insert text into Editor

Customizing Tips

Tip #13 You can insert a snippet by pressing Tab Tab

Type in snippet shortcut, then press Tab Tab

Tip #14 You can create temp or throw away projects

Tools – Options – Projects and Solutions – General, uncheck Save new projects when created

Tip #15 Change text editor font size via keyboard (Accessibility macros) or use the new Zoom control

Command: Macros.Samples.Accessibility.DecreaseTextEditorFontSize

Command: Macros.Samples.Accessibility.IncreaseTextEditorFontSize

Tip #16 How to open a file without any UI

Ctrl+/ (or whatever Tools.GoToCommandLine is bound to)

alias fo file.openfile

fo <filename>

Tip #17 Guidelines in the editor registry key hackYou’ll need an extension to do this for VS 2010. More after my Visual Studio 2010 Tips Advanced session

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Text Editor  String RBG(128,0,0) 5, 20

Tip #18 You can create a macro for your import/export settings

Tools – customize – commands – macros – drag and drop macro to toolbar

Tip #19 How to not show the start page (or have the last loaded solution open)

Tools – Options – Environment – Startup, At Startup

Tip #20 File tab channel registry hackNo longer needed for VS 2010!!! Tools – Options – Environment – Document, insert files from right

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0 key, you can create a DWORD UseMRUDocOrdering = 1

Tip #21How to show Misc Files Project to keep your files around

tools – options – environment – documents, show miscellaneous files in Solution Explorer

Tip #22 Edit project file from within IDE (unload project)

Unload project, edit project, reload project

Debugging Tips

Tip #23 You can use tracepoints to log stuff in your code

Right-click in indicator margin, select breakpoints, select Insert Tracepoint

Tip #24 How to get the find source dialog backMuch better experience in VS 2010!!! In the “No source code” window, there’s now a “browse for source” link

Solution Properties, under Common Properties – Debug Source Files, Delete Do no look for these source files edit box contents

Tip #25 You can disable the exception assistant

Tools – Options – Debugging – General, uncheck Enable the Exception Assistant

Tip #26 XML Visualizers

Visual Studio 2010 Tips – Part 2 (Advanced)

This is still a deep dive into the IDE, and not about coding or actually writing extensions.

For this talk, I’m going to cover a few must-have extensions for Visual Studio 2008, and then go straight into new features and extensions.

Here’s the list of what I’m going to cover:

Must have Visual Studio 2008 Tips

Tip #1 – Behold the power of incremental search

Tip #2 – Customize Find in Files / Registry edit to simply Find results window

Tip #3 – How not to accidentally cut/copy a blank line

Tip #4 – How to open a file without any UI

New Visual Studio 2010 features

Make sure to follow the new Visual Studio 2010 tip of the day with Zain!

Tip #5 – How to use Multi-line edit

Tip #6 – How to insert files from Right to Left in File tab channel

Tip #7 – Automatic Highlighting of Symbols

Tip #8 – IntelliSense “Sub-String” and Pascal Casing searching

Tip #9 – IntelliSense consume first / suggestion mode

Tip #10 – They Fixed the VB Smart tag bug

Press Ctrl+<period> to invoke smart tag, but now in VB, the first option in list is automatically selected, so you can simply hit <Enter> without having to first press the down arrow.

Tip #11 – New HTML and JavaScript Code Snippets

Tip #12 – Improved Outlining Collapsing / Expanding

In VS2010, you can select anywhere within the code block to collapse the region. You no longer have to click just the ‘-‘ box in the outlining margin to collapse the region.

Tip #13 – Navigate To

Tip #14 – Call Hierarchy

Tip #15 – Mutli-monitor Support

You can now drag out file tabs from the file tab channel and treat them like tool windows. Also, both these file tabs and tool windows will listen to WindowsKey + Arrow to snap to the monitor’s edge. use ctrl+DoubleClick to put either file or tool window back within Visual Studio in the “tabbed document” state.

Tip #16 – Zoom / Ctrl+Mouse Wheel

Tip #17 – The New and Improved Datatips

Tip #18 – Labeling and Sharing Breakpoints

Tip #19 – Getting Started with IntelliTrace

Tip #20 – WPF visualizer

Visual Studio Extensions

Tip #21 – How to Install Extensions

Tip #22 – Walkthrough of a few extensions

Tip #23 – Getting started writing your own extensions

MSDN Sample used in today’s talk

Tip #24 – How to search project templates

Tip #25 – Add Reference Dialog Improvements

Thank you!

Visual Studio 2010 Tip of the Day Returns!!

Zain Naboulsi, a Developer Evangelist, has started the Tip of the Day series for Visual Studio 2010. I spent a lot of time with Zain last year sharing what I’ve learned about writing a new tip every single day for a year, so he knows what he’s getting into. =D I’m very excited to see the series return!

It’s all yours Zain!

http://blogs.msdn.com/zainnab/archive/tags/vs2010/Tips+and+Tricks/default.aspx

TechEd Australia and New Zealand – 25 Visual Studio 2008 IDE Tips

Thanks for coming to today’s session! As I’ve said (or about to say), don’t take notes! Here are all the tips for you. Just sit back, relax, and enjoy the show!

0. Know your Keybindings! All these are in the General Development Settings.

Searching

1. How to behold the power of incremental search

http://blogs.msdn.com/saraford/archive/2007/07/23/did-you-know-behold-the-power-of-incremental-search.aspx

Command: Edit.IncrementalSearch

Shortcut: Ctrl+i

2. Ctrl+F3 to search for currently-selected word

http://blogs.msdn.com/saraford/archive/2007/10/26/did-you-know-ctrl-f3-searches-for-the-currently-selected-string-without-brining-up-the-find-window.aspx

Command: Edit.FindNextStatement

3. F3 to search for last thing you searched for

http://blogs.msdn.com/saraford/archive/2007/10/25/did-you-know-f3-searches-for-the-last-thing-you-searched-for.aspx

Command: Edit.FindNext

4. Customize what files to find in

http://blogs.msdn.com/saraford/archive/2007/11/07/did-you-know-how-to-customize-what-files-to-find-in.aspx

Find In Files – Look in – Choose Search Folders

5. You can use a reg hack for customizing search results

http://blogs.msdn.com/saraford/archive/2008/11/24/did-you-know-you-can-customize-how-search-results-are-displayed-in-the-find-results-window-363.aspx

HKCU\Software\Microsoft\VisualStudio\9.0\Find String Find=$f$e($l,$c):$t\r\n

Editing

6. How not to accidentally copy a blank line

http://blogs.msdn.com/saraford/archive/2007/09/28/did-you-know-how-not-to-accidentally-copy-a-blank-line.aspx

Tools – Options – Text Editor – All Languages – General, Uncheck Apply cut or copy to blank lines

7. How to cycle through the Clipboard ring

http://blogs.msdn.com/saraford/archive/2007/10/01/did-you-know-how-to-cycle-through-the-clipboard-ring-to-paste-different-things.aspx

Command: Edit.CycleClipboardRing

Shortcut: Ctrl+Shift+v

8. How to use box/column selection in the editor

http://blogs.msdn.com/saraford/archive/2007/07/27/did-you-know-how-to-do-box-selection-in-the-editor.aspx

Command: Edit.LineUpColumnExtend, Edit.LineDownColumnExtend, Edit.CharRightColumnExtend, Edit.CharLeftColumnExtend

Shortcut: Shift+Alt+Arrow

9. You can copy a file’s full path / open windows explorer from the file tab channel

http://blogs.msdn.com/saraford/archive/2008/01/09/did-you-know-you-can-copy-a-file-s-full-path-from-the-file-tab-channel.aspx

Command: File.CopyFullPath

10. Drag and drop code onto the toolbox’s general tab

http://blogs.msdn.com/saraford/archive/2008/04/10/did-you-know-you-can-drag-and-drop-code-onto-the-toolbox-general-tab-191.aspx

11. You can use Ctrl+. to show a smart tag

http://blogs.msdn.com/saraford/archive/2008/11/18/did-you-know-ctrl-shows-a-smart-tag-359.aspx

Command: View.ShowSmartTag

12. You can insert a snippet by pressing Tab Tab

http://blogs.msdn.com/saraford/archive/2008/06/10/did-you-know-you-can-insert-a-snippet-via-tab-tab-234.aspx

Type in snippet shortcut, then press Tab Tab

Customizing

13. You can create temp or throw away projects

http://blogs.msdn.com/saraford/archive/2008/02/25/did-you-know-you-can-create-temp-or-throw-away-projects-158.aspx

Tools – Options – Projects and Solutions – General, uncheck Save new projects when created

14. Change text editor font size via keyboard (Accessibility macros)

http://blogs.msdn.com/saraford/archive/2008/06/20/did-you-know-you-can-bind-macros-to-keyboard-shortcuts-or-how-to-quickly-increase-decrease-your-text-editor-font-size-242.aspx

Command: Macros.Samples.Accessibility.DecreaseTextEditorFontSize

Command: Macros.Samples.Accessibility.IncreaseTextEditorFontSize

15. How to open a file without any UI

http://blogs.msdn.com/saraford/archive/2007/11/26/did-you-know-how-to-have-fun-with-the-find-combo-box.aspx

Ctrl+/ (or whatever Tools.GoToCommandLine is bound to)

alias fo file.openfile

fo <filename>

16. Guidelines in the editor registry key hack

http://blogs.msdn.com/saraford/archive/2008/04/01/did-you-know-you-can-display-guidelines-in-the-editor-and-tip-of-the-day-ends-today-184.aspx

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor  String RBG(128,0,0) 5, 20

17. You can create a macro for your import/export settings – see http://blog.jeffhandley.com/archive/2009/03/31/vs-profiles.aspx

http://blogs.msdn.com/saraford/archive/2008/12/05/did-you-know-you-can-create-toolbar-buttons-to-quickly-toggle-your-favorite-vs-settings-371.aspx

18. How to not show the start page (or have the last loaded solution open)

http://blogs.msdn.com/saraford/archive/2008/01/03/did-you-know-how-to-customize-what-visual-studio-opens-to-or-how-to-make-the-start-page-not-show-up-when-vs-opens.aspx

Tools – Options – Environment – Startup, At Startup

19. File tab channel registry hack

http://blogs.msdn.com/saraford/archive/2008/10/09/did-you-know-you-can-keep-recently-used-files-from-falling-off-the-file-tab-channel-331.aspx

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0 key, you can create a DWORD UseMRUDocOrdering = 1

20. How to show Misc Files Project to keep your files around

http://blogs.msdn.com/saraford/archive/2008/01/01/did-you-know-how-to-show-the-miscellaneous-files-project-in-the-solution-explorer.aspx

tools – options – environment – documents, show miscellaneous files in Solution Explorer

21. Edit project file from within IDE (unload project)
http://blogs.msdn.com/saraford/archive/2008/10/10/did-you-know-how-to-edit-a-csproj-or-vbproj-project-file-within-the-ide-332.aspx

Unload project, edit project, reload project

Debugging

22. You can use tracepoints to log stuff in your code

http://blogs.msdn.com/saraford/archive/2008/06/13/did-you-know-you-can-use-tracepoints-to-log-printf-or-console-writeline-info-without-editing-your-code-237.aspx

Right-click in indicator margin, select breakpoints, select Insert Tracepoint

23. How to get the find source dialog back

http://blogs.msdn.com/saraford/archive/2008/09/17/did-you-know-how-to-get-the-find-source-dialog-back-instead-of-the-there-is-no-source-code-available-message-315.aspx

Solution Properties, under Common Properties – Debug Source Files, Delete Do no look for these source files edit box contents

24. You can disable the exception assistant

http://blogs.msdn.com/saraford/archive/2008/08/05/did-you-know-you-can-disable-the-exception-assistant-274.aspx

Tools – Options – Debugging – General, uncheck Enable the Exception Assistant

25. You can use the XML Visualizer

http://blogs.msdn.com/saraford/archive/2008/09/25/did-you-know-you-can-use-the-xml-visualizer-to-view-xml-321.aspx

Drop down the little down arrow on the data tip or in the watch window.

How to trick Visual Studio to not show line numbers for blank lines?

Going through my folder of my blog “contact me” emails, I came across this question. I like tricking Visual Studio into doing things, so I thought I’d share.

Is there a way to display only line number of coded lines, i.e. don’t number blank lines? Numbered blank lines makes showing code in powerpoint decks hard to follow.

Here’s the screenshot of what could go into your powerpoint deck.

line numbers only on real lines of code

To do this,

  1. Enable Word Wrap (Tools Options – Text Editor – All Languages – General)
  2. At the end of the first real line (like #28 above), start inserting white space until it goes off the screen. Note the Word Wrap glyph.
  3. Turn off the Word Wrap glyph (same place as in step 1) and Turn off “View White Space” (Edit – Advance – View White Space)

Here’s what the hack really looks like

what hack looks like using visible white space

Sorry, this isn’t the start of a new VS tip series. Just wanted to share some q&a that have come in through my blog.

Technorati Tags: VS2005Tips,VS2008Tips

DevDays 09 – 24 Visual Studio Tips

Tip #0 Know your Keybindings! General Development Settings

Searching Tips

Tip #1 How to behold the power of incremental search

Command: Edit.IncrementalSearch

Shortcut: Ctrl+i

Tip #2 Ctrl+F3 to search for currently-selected word

Command: Edit.FindNextSelected

Tip #3 F3 to search for last thing you searched for

Command: Edit.FindNext

Tip #4 Customize what files to find in

Find In Files – Look in – Choose Search Folders

Tip #5 You can use a reg hack for customizing search results

HKCU\Software\Microsoft\VisualStudio\9.0\Find String Find=$f$e($l,$c):$t\r\n

Editing Tips

Tip #6 How not to accidentally copy a blank line

Tools – Options – Text Editor – All Languages – General, Uncheck Apply cut or copy to blank lines

Tip #7 How to cycle through the Clipboard ring

Command: Edit.CycleClipboardRing

Shortcut: Ctrl+Shift+v

Tip #8 How to use box/column selection in the editor

Command: Edit.LineUpColumnExtend, Edit.LineDownColumnExtend, Edit.CharRightColumnExtend, Edit.CharLeftColumnExtend

Shortcut: Shift+Alt+Arrow

Tip #9 You can copy a file’s full path / open windows explorer from the file tab channel

Command: File.CopyFullPath

Tip #10 Drag and drop code onto the toolbox’s general tab

Shortcut: Ctrl+Alt+x

Tip #11 You can use Ctrl+. to show a smart tag

Command: View.ShowSmartTag

Tip #12 You can insert a snippet by pressing Tab Tab

Type in snippet shortcut, then press Tab Tab

Customizing Tips

Tip #13 You can create temp or throw away projects

Tools – Options – Projects and Solutions – General, uncheck Save new projects when created

Tip #14 Change text editor font size via keyboard (Accessibility macros)

Command: Macros.Samples.Accessibility.DecreaseTextEditorFontSize

Command: Macros.Samples.Accessibility.IncreaseTextEditorFontSize

Tip #15 How to open a file without any UI

Ctrl+/ (or whatever Tools.GoToCommandLine is bound to)

alias fo file.openfile

fo <filename>

Tip #16 Guidelines in the editor registry key hack

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor  String RBG(128,0,0) 5, 20

Tip #17 You can create a macro for your import/export settings

Tools – customize – commands – macros – drag and drop macro to toolbar

Tip #18 How to not show the start page (or have the last loaded solution open)

Tools – Options – Environment – Startup, At Startup

Tip #19 File tab channel registry hack

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0 key, you can create a DWORD UseMRUDocOrdering = 1

Tip #20 How to show Misc Files Project to keep your files around

tools – options – environment – documents, show miscellaneous files in Solution Explorer

Tip #21 Edit project file from within IDE (unload project)

Unload project, edit project, reload project

Debugging Tips

Tip #22 You can use tracepoints to log stuff in your code

Right-click in indicator margin, select breakpoints, select Insert Tracepoint

Tip #23 How to get the find source dialog back

Solution Properties, under Common Properties – Debug Source Files, Delete Do no look for these source files edit box contents

Tip #24 You can disable the exception assistant

Tools – Options – Debugging – General, uncheck Enable the Exception Assistant