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
Command: Edit.IncrementalSearch
Shortcut: Ctrl+i
2. Ctrl+F3 to search for currently-selected word
Command: Edit.FindNextStatement
3. F3 to search for last thing you searched for
Command: Edit.FindNext
4. Customize what files to find in
Find In Files – Look in – Choose Search Folders
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
6. How not to accidentally copy a blank line
Tools – Options – Text Editor – All Languages – General, Uncheck Apply cut or copy to blank lines
7. How to cycle through the Clipboard ring
Command: Edit.CycleClipboardRing
Shortcut: Ctrl+Shift+v
8. How to use box/column selection in the editor
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
Command: File.CopyFullPath
10. Drag and drop code onto the toolbox’s general tab
11. You can use Ctrl+. to show a smart tag
https://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
Type in snippet shortcut, then press Tab Tab
Customizing
13. You can create temp or throw away projects
Tools – Options – Projects and Solutions – General, uncheck Save new projects when created
14. Change text editor font size via keyboard (Accessibility macros)
Command: Macros.Samples.Accessibility.DecreaseTextEditorFontSize
Command: Macros.Samples.Accessibility.IncreaseTextEditorFontSize
15. How to open a file without any UI
Ctrl+/ (or whatever Tools.GoToCommandLine is bound to)
alias fo file.openfile
fo <filename>
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
17. You can create a macro for your import/export settings – see https://blog.jeffhandley.com/archive/2009/03/31/vs-profiles.aspx
18. How to not show the start page (or have the last loaded solution open)
Tools – Options – Environment – Startup, At Startup
19. File tab channel registry hack
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
tools – options – environment – documents, show miscellaneous files in Solution Explorer
21. Edit project file from within IDE (unload project)
https://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
Right-click in indicator margin, select breakpoints, select Insert Tracepoint
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
24. You can disable the exception assistant
Tools – Options – Debugging – General, uncheck Enable the Exception Assistant
25. You can use the XML Visualizer
Drop down the little down arrow on the data tip or in the watch window.
Comments
Anonymous
September 09, 2009
Awesome Sara, Wathing this presentation @ Tech Ed now,CheersAnonymous
September 09, 2009
Thanks Sara, your session was one of the best of the whole conference. Two of those tips (Tracepoints and the XML view) are going to save me hours.Anonymous
September 09, 2009
Thanks all! I'm glad you enjoyed the talk! It's unfortunately we had such a small room. I had no control over the logistics. =( Please fill out an eval if you liked the session. We take the evals very seriously! Thanks! -saraAnonymous
September 12, 2009
Great post! I read it on: http://thatstoday.com/article/695901/teched-australia--25-visual-studio-2008-ide-tipsAnonymous
September 13, 2009
What this highlights is Microsoft and software interfaces in general have a long way to go in terms of interacting with humans. It is great to know some of the more obscure keyboard shortcuts to accomplish tasks in Visual Studio but it would be even better if the User Interface (UI) could move towards making these commands more obvious. Some commands would even become irrelevant if the UI could be more in-tune with the developers actions.Anonymous
September 13, 2009
Thanks !! I couldn't fit in the room at tech.ed. So great to see this here. Incremental search is very cool.Anonymous
September 13, 2009
Thanks a bunch Sara!!! I've been trying to find that MRU tip for a while now. Ever since I installed Windows 7 on my notebook! It's been a nightmare working without it. I honestly don't know how I ever got by before I found your tips. Need to look online so I can buy the book =)Anonymous
September 25, 2009
Thank u Sara, You are so kind for us!