This is a discussion on Visual Studio Tips & Tricks within the C# Programming forums, part of the Software Development category; Global Keys - VII Shift+F5 Debug StopDebugging Alt+F6 Window NextPane Ctrl+F6 Window NextDocumentWindow Ctrl+Shift+F6 Window PreviousDocumentWindow ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Global Keys - VII Shift+F5 Debug StopDebugging Alt+F6 Window NextPane Ctrl+F6 Window NextDocumentWindow Ctrl+Shift+F6 Window PreviousDocumentWindow F6 Window NextSplitPane Shift+Alt+F6 Window PreviousPane Shift+F6 Window PreviousSplitPane Alt+F7 Window NextToolWindowNav Ctrl+F7 Build Compile F7 View ToggleDesigner Shift+Alt+F7 Window PreviousToolWindowNav Alt+F8 View MacroExplorer F8 Edit GoToNextLocation Shift+F8 Edit GoToPrevLocation Alt+F9, A DebuggerContextMenus BreakpointsWindow |
| Sponsored Links |
| |||
| Global Keys - VIII Alt+F9, D DebuggerContextMenus BreakpointsWindow Alt+F9, S DebuggerContextMenus BreakpointsWindow Ctrl+F9 Debug EnableBreakpoint Ctrl+Shift+F9 Debug DeleteAllBreakpoints F9 Debug ToggleBreakpoint Shift+F9 Debug QuickWatch Ctrl+Alt+G Debug Registers Ctrl+G Edit GoTo Ctrl+Shift+G Edit OpenFile Ctrl+Alt+H Debug Threads Ctrl+H Edit Replace Ctrl+Shift+H Edit ReplaceinFiles Ctrl+Alt+I Debug Immediate |
| |||
| Global Keys - IX Ctrl+Alt+Ins Project Override Ctrl+Ins Edit Copy Ctrl+Shift+Ins Edit CycleClipboardRing Shift+Ins Edit Paste Ctrl+Alt+J View ObjectBrowser Ctrl+K, Ctrl+B Tools CodeSnippetsManager Ctrl+K, Ctrl+F NewFolder Ctrl+K, Ctrl+M Edit GenerateMethodStub Ctrl+K, Ctrl+N Edit NextBookmark Ctrl+K, Ctrl+P Edit PreviousBookmark Ctrl+K, Ctrl+R View ObjectBrowserGoToSearchCombo Ctrl+K, Ctrl+S Edit SurroundWith Ctrl+K, Ctrl+V View ClassViewGoToSearchCombo Ctrl+K, Ctrl+W View BookmarkWindow |
| |||
| Global Keys - X Ctrl+K, Ctrl+X Edit InsertSnippet Ctrl+Shift+K, Ctrl+Shift+N Edit NextBookmarkInFolder Ctrl+Shift+K, Ctrl+Shift+P Edit PreviousBookmarkInFolder Ctrl+Alt+L View SolutionExplorer Alt+Left Arrow View Backward Left Arrow Edit MoveControlLeftGrid Shift+Left Arrow Edit SizeControlLeftGrid Ctrl+Alt+M, 1 Debug Memory1 Ctrl+Alt+M, 2 Debug Memory2 Ctrl+Alt+M, 3 Debug Memory3 Ctrl+Alt+M, 4 Debug Memory4 Ctrl+Alt+N Debug ScriptExplorer Ctrl+N File NewFile Ctrl+Shift+N File NewProject |
| |||
| Global Keys - XI Alt+Num * Debug ShowNextStatement Ctrl+Alt+OView Output Ctrl+O File OpenFile Ctrl+Shift+O File OpenProject Ctrl+Alt+P Tools AttachtoProcess Ctrl+P File Print Ctrl+Shift+P Tools RunTemporaryMacro Ctrl+PgDn Window NextTab Ctrl+Q Data RunSelection Ctrl+Alt+R View WebBrowser Ctrl+R, Ctrl+E Refactor EncapsulateField Ctrl+R, Ctrl+I Refactor ExtractInterface Ctrl+R, Ctrl+M Refactor ExtractMethod Ctrl+R, Ctrl+O Refactor ReorderParameters |
| |||
| Global Keys - XII Ctrl+R, Ctrl+P Refactor PromoteLocalVariable Ctrl+R, Ctrl+R Refactor Rename Ctrl+R, Ctrl+V Refactor RemoveParameters Ctrl+Shift+R Tools RecordTemporaryMacro Alt+Right Arrow View Forward Right Arrow Edit MoveControlRightGrid Shift+Right Arrow Edit SizeControlRightGrid Ctrl+Alt+S View ServerExplorer Ctrl+S File SaveSelectedItems Ctrl+Shift+S File SaveAll Ctrl+Alt+T View DocumentOutline Ctrl+Shift+Tab Window PreviousDocumentWindowNav Ctrl+Tab Window NextDocumentWindowNav Shift+Tab Edit SelectPreviousControl |
| |||
| Global Keys - XIII Tab Edit SelectNextControl Ctrl+Alt+U Debug Modules Shift+Up Arrow Edit SizeControlUpGrid Up Arrow Edit MoveControlUpGrid Ctrl+Alt+V, A Debug Autos Ctrl+Alt+V, L Debug Locals Ctrl+Alt+W, 1 Debug Watch Ctrl+Alt+W, 2 Debug Watch2 Ctrl+Alt+W, 3 Debug Watch3 Ctrl+Alt+W, 4 Debug Watch4 Ctrl+Shift+W File ViewinBrowser Ctrl+Alt+X View Toolbox Ctrl+Shift+X Test StartSelectedTestProjectwithoutDebugger Shift+Alt+X Test StartSelectedTestProjectwithDebugger |
| |||
| Global Keys - XIV Ctrl+Alt+Z Debug Processes Ctrl+Shift+Z Edit Redo hi every body still now i show all the short cuts keys used globally in future i ll show u some other key words also thak u .... |
| |||
| How to bind keyboard shortcuts to commands The Visual Studio shell is a big place. I should know, since I used Visual J++ everyday for a year before joining the team. As I write these tips, I try to think back to my J++ days to come up with a list of tips and tricks I wish I had known back then what I now take for granted. One of these is definitely keyboard binding. Maybe I didn’t look hard enough for features within Visual Studio. Maybe I never needed to rebind a command, so I never discovered this. Anyways, here’s how to do it, so everyone knows now.
Also note that there are different scopes. There’s the combo box “Use new shortcut in:” which usually says “Global.” This is the current scope for that particular keyboard shortcut. For example, keyboard shortcuts assigned in the “Text Editor” scope will only work when focus is on the Text Editor. If you place focus on a tool window and try the same keyboard shortcut, the command that is bound to that keyboard shortcut under global scope will execute. Another “fun” way of learning about Visual Studio is to go through the list of commands available. For example, if you type Edit.Line, you’ll see all of the commands that contain “Edit.Line”. You’ll discover a command called “Edit.LineTranspose” which is bound to Shift+Alt+T. In case you ever need to transpose a line, you now know the keyboard shortcut for it. And vice versa, if you want to find out what the commands that are bound to Ctrl-<letter>, simply put the focus into the “Press shortcut key(s):” edit box and party on it ‘til your heart's content. Happy Editing!
__________________ J.Saravanan |
| |||
| How to have fun with the Visual Studio Find Combo Box These tips will work on both Visual Studio .NET 2003 and Visual Studio 2005.
__________________ J.Saravanan |
| |||
| How to do column selection Did you know that Visual Studio has two different selection models? Stream and Box. Stream selection is what everyone is familiar with. Hold down the shift key and arrow left, right, up, or down. Box selection allows you to manually select columns and lines at the same time. Probably not the best explanation of box selection, but hey, it was worth a try. =) To use box selection, just hold down Shift-Alt and then move the arrow keys around. You’ll quickly get the feel for box selection. Happy Editing!
__________________ J.Saravanan |
| |||
| How to save your favorite window layouts in Visual Studio .NET 2003 This tip is for Visual Studio .NET 2003. Although it will work in Visual Studio 2005, there are easier ways to save your favorite window layouts – which is a tip to be told at another time. There are four different window layout states
I was asked earlier this week in email how to get rid of the Object Browser when it appears every time you launch VS. The answer is to close the Object Browser (or whatever tool windows you want to close or open whenever the shell is launched) and shut down the shell. The state is written out to devenv.xml, so the next time you launch, you get the desired configuration. Same is true for the other different window layouts for Full Screen, Debugging and File view. Set the desired state, shut down, and when you relaunch, you’ll have your desired configuration. If you ever need to get back to the original configuration, delete %appdata%\Microsoft\VisualStudio\7.1\devenv.xml. Happy Visual Studioing!
__________________ J.Saravanan |
| |||
| Navigate between files in Solution Explorer If you’re working in a large solution or a project that contains numerous files, one quick way to jump to the file you want to open is to type the first few letters of the filename. For example, if I were on filename “Class1” and wanted to select “ReadMe.txt”, I could just press Ctrl+Alt+L (in General Development Environment) to bring up Solution Explorer and then type “Rea”. If there are no other Rea* files, ReadMe.txt will get selected. In case of a conflict, the first filename listed wins. I had a coworker show me this trick. Most standard Windows list views and tree views controls support type-ahead selection, but I just never thought to try it using the Solution Explorer before. It’s really the simple things in life =) Happy Visual Studio’ing!
__________________ J.Saravanan Last edited by SaravananJ : 09-12-2007 at 03:56 AM. Reason: # |
| |||
| Use Ctrl+Alt+DownArrow to quickly access all your open files At the end of the File Tab Channel, there’s a drop-down arrow and a close ‘x’ button. If you press the drop-down arrow, you’ll get a menu of all the open files in Visual Studio in alphabetical order. Simply click on a file name, and it’ll open on the left-side of the IDE file channel. Now for today’s actual tip. The command to drop down the menu is bound to “Ctrl+Alt+Down Arrow”. Anywhere in the IDE, you can press Ctrl+Alt+Down Arrow and get the menu to pop-up. Now, you can type the name of the file (or the first few unique characters of the file name) to quickly select that file. Not jazzed about using two hands to access this keyboard shortcut? Change it by going to Tools – Options – Keyboard, and type in the Show commands containing edit box “Window.ShowEzMDIFileList” and bind it to whatever. Just make sure you’re in Global scope (you can use any scope, but Global scope makes the most sense for this feature.) Happy Visual Studio'ing!
__________________ J.Saravanan |
| |||
| HTML Editor Design View Ctrl+B Format Bold Ctrl+Alt+Down Arrow Layout InsertRowBelow Shift+F7 View ViewMarkup Ctrl+I Format Italic Ctrl+L Format ConverttoHyperlink Ctrl+Shift+L Format InsertBookmark Ctrl+Alt+Left Arrow Layout InsertColumntotheLeft Ctrl+M, Ctrl+C Project AddContentPage Ctrl+M, Ctrl+M View EditMaster Ctrl+Alt+QView NonVisualControls Ctrl+Q View VisibleBorders Ctrl+Shift+Q View Details Ctrl+Alt+Right Arrow Layout InsertColumntotheRight Ctrl+U Format Underline Ctrl+Alt+Up Arrow Layout InsertRowAbove |
| |||
| HTML Editor Source View Ctrl+Shift+. View AutoCloseTagOverride Shift+F7 View ViewDesigner Ctrl+PgDn View NextView Ctrl+PgUp Window PreviousTab |
| |||
| 1.0 - Inserting Comment Tokens (Ctrl-K,Ctrl-H) This feature enables you to write a comment and find it again easily. To see a list of all reminders you placed in your code (see Figure 1): Without recompiling, select View > Show Tasks > All To insert task shortcuts in your code: Press Ctrl-K, Ctrl-H. This marks the current line with a shortcut icon and inserts a clickable shortcut icon in the Task List. To remove the shortcut: Press Ctrl-K, Ctrl-H. These shortcuts survive IDE restarts. ![]() Figure 1. Comment Tokens. |
| |||
| 1.1 - Commenting Code Blocks (Ctrl-K, Ctrl-C) One-line comments are extremely useful in explaining seldom used code and assisting in navigation and definition of development projects. To inserted a comment for a code block or segment: Press the “//” token for Visual APL. Additionally, Visual APL allows you to comment entire paragraphs and segments. To place a comment in a paragraph or segment: Select “/#” (and corresponding “#/”) tag around the comment. To quickly comment entire paragraphs: Select the text. Click the Comment button (see Figure 2) or Press Ctrl-K, Ctrl-C. This comments an entire selection. To uncomment any selection: Click the Uncomment button or Press Ctrl-K, Ctrl-U. ![]() Figure 5 - Comment and Uncomment buttons |
| |||
| 1.2 -Creating Regions The more code you generate, the more difficult it can become to navigate. In addition to selecting classes and their methods from the drop-down lists above the main editor, you can also group your code into logical regions. Regions are extremely helpful for dividing code in logical ways and even commenting it. Regions allow you to collapse code to a single line defining the region and still easily see what is inside it once it is collapsed. They can even be nested. Automatically generated code in VS.NET usually uses this feature, so you may already be familiar with it. To specify a region: Insert a #region keyword and a description at the beginning of your segment and a corresponding #endregion keyword at the end of your segment (see Figure 3). ![]() Figure 3 - Creating regions The Outlining menu displays various collapse and expand options. To expand and collapse the current region you are in: Press Ctrl-M, Ctrl-M. To expand or collapse all regions at once: Right-click the gray bar to the left of the main editor window. To collapse an individual region: Click the plus sign next to the #region keyword. This collapses the code into a single line that shows the region description. To display the inside of a collapsed region: Move the mouse over the gray description area (see Figure 4). ![]() Figure 4 - Mouse over a region to see its content You can even drag and drop collapsed regions inside your code. When you paste a collapsed region into a different location, the pasted text is automatically expanded. |