Posted by Shaunak Pandit on September 27, 2008
How many times we get fed up of all the cluttered code? Best thing to do is put regions and collapse the regions to free up some space…
- Fold/Unfold the current code block –
Ctrl+M, Ctrl+M
- Unfold all –
Ctrl+M, Ctrl+L
- Stop outlining –
Ctrl+M, Ctrl+P
- Fold all –
Ctrl+M, Ctrl+O
Posted in .NET, Problem Solving, Visual Studio Tips and Tricks | Tagged: collapse code block, collapse regions, expand regions, fold regions, unfold regions, Visual studio IDE shortcuts, Visual Studio IDE Tips & tricks:, Visual Studio IDE Tips and tricks | Leave a Comment »
Posted by Shaunak Pandit on September 10, 2008
ShotCut Keys
Convert selected code to lower case – Ctrl+U
Convert selected code to upper case – Ctrl+Shift+U
Comment selected code – Ctrl+K, Ctrl+C
Uncomment selected code – Ctrl+K, Ctrl+U
WordWrap
Have a line of code which goes beyond the screen width? but you need to keep it that way and the only alternative is to scroll all the way to the right?
Well theres good news VS IDE provides a (toggle) shortcut which will put the line contents beyond the screen width on the next line and back onto the same line.
ShortCut Key : – Ctrl + r + r (toggles)
Posted in .NET, Visual Studio Tips and Tricks | Tagged: commenting code, Visual Studio IDE : ShortCuts for formating code, Visual studio shortcuts, wordwrap code | Leave a Comment »
Posted by Shaunak Pandit on September 10, 2008
Bookmarks
Bookmarks are available through Edit – > Bookmarks.
using bookmarks we can mark places in our code which we would like to revisit later on.
Create/Remove Bookmark – Ctrl+K, Ctrl+K
Move to next bookmark – Ctrl+K, Ctrl+N
Move to previous bookmark – Ctrl+K, Ctrl+P
Clear all bookmarks – Ctrl+K, Ctrl+L
Incremental Search Pressing
Ctrl+i will incrementally search for text as you type.
HOWTO : Press Ctrl + i then type the word you want to search. Hit backspace to clear a character and enter to finish.
Pressing F3 after this will work as usual, i.e. search for the next occurrence of previous search.
Posted in .NET, Visual Studio Tips and Tricks | Tagged: Visual Studio IDE : Bookmarks & Incremental Search, Visual studio shortcuts, Visual studio tips, VS bookmarks, VS incremental search | Leave a Comment »
Posted by Shaunak Pandit on January 4, 2005
Convert selected code to lower case – Ctrl+U
Convert selected code to upper case – Ctrl+Shift+U
Comment selected code – Ctrl+K, Ctrl+C
Uncomment selected code – Ctrl+K, Ctrl+U
WordWrap
Have a line of code which goes beyond the screen width? but you need to keep it that way and the only alternative is to scroll all the way to the right?
Well theres good news VS IDE provides a toggle shortcut which will put the line contents beyond the screen width on the next line and back onto the same line
ShortCut Key : – Ctrl + r + r (toggles)
Posted in .NET, Visual Studio Tips and Tricks | Tagged: Visual studio IDE shortcuts, Visual studio shortcuts, Visual Studio Tips and Tricks | Leave a Comment »
Posted by Shaunak Pandit on January 4, 2005
Letting .Net remind you of the TODO task in your code
.Net IDE provides a mechanism of keeping track of all the TODO tasks in your code.This is done through the Task window
Using the “TODO“ Keyword we can tell .NET IDE to remind us about this TODO task in the task window
HOWTO : – simply add a comment to your code that starts with the TODO keyword. It will automatically be added to your existing Task list.
E.g : – // TODO: Need to optimise the AuthoriseUser Method.
To view the Task list (ShortCut Key : Ctrl+Alt+K ):-
select View > Other Windows > Task List from the menu .
The Task list often filters its contents, so it displays only certain information. To view everything, right-click on your list and select All Tasks > All.
Posted in .NET, Visual Studio Tips and Tricks | Tagged: IDE remind, Visual Studio IDE Tips & tricks:, Visual studio remind TODO task, Visual studio shortcuts, Visual studio TODO | Leave a Comment »
Posted by Shaunak Pandit on January 4, 2005
Storing Often-Used Code in the Toolbox
If there is some often-used code and templates that you repeatedly have to use across various code behinds what would you usually do ?
Copy that code snippet somewhere , say … in notepad or something and everytime you need it you will simply copy it back into the code behind. Well thats the most obvious thing to do, but did you know that VS IDE allows us to store code snippets into the toolbar for later use??
HowTO : – Simply drag and drop your code straight onto one of the toolbox tabs, such as the General tab or create your own tab . When you need to use it again, simply drag and drop back into your code window.These code snippets will persist there across projects.Hence making our job easier.
Posted in .NET, Visual Studio Tips and Tricks | Tagged: Code Snippets, Frequently used code, Visual studio IDE store code snippets, Visual studio shortcuts, Visual studio Toolbox code | Leave a Comment »
Visual Studio IDE Tips & tricks: ShortCuts for formating code , commenting code , wordwrap code
Posted by Shaunak Pandit on September 10, 2008
ShotCut Keys
Convert selected code to lower case – Ctrl+U
Convert selected code to upper case – Ctrl+Shift+U
Comment selected code – Ctrl+K, Ctrl+C
Uncomment selected code – Ctrl+K, Ctrl+U
WordWrap
Have a line of code which goes beyond the screen width? but you need to keep it that way and the only alternative is to scroll all the way to the right?
Well theres good news VS IDE provides a (toggle) shortcut which will put the line contents beyond the screen width on the next line and back onto the same line.
ShortCut Key : – Ctrl + r + r (toggles)
Posted in .NET, Visual Studio Tips and Tricks | Tagged: commenting code, Visual Studio IDE : ShortCuts for formating code, Visual studio shortcuts, wordwrap code | Leave a Comment »