Sweet IDE tricks Vs.NET

Faith
09-28-2004, 04:21 PM
You know any I don't know, I've got the idea that these features are laid in the IDE just for people to randomly find out ;)
What I know:

1. Select Code with Alt+Mouse, a rectangular selection, sweet indeed...

2. Bookmarks,
- Ctrl+K ^2 inserts one
- Ctrl+K & Ctrl+P moves to previous bookmark
- Ctrl+K & Ctrl+N moves to next bookmark
- Sweet!

3. The old feature also in vb6
- Shift-F2 moves to the declaration of a variable under cursor
- Ctrl+Shift+F2 moves from a declaration to a place where the variable is next used

4. Task List
- Tools->Options->Environment->Tasklist, from here you can add your own tokens or use the ones that are...
- If you create comment like perhaps

'UNDONE 1: This is not done
'UNDONE 2: This is not done

-You can navigate through your code by those tokens which are specifically shown in the tasklist box, sweet!

5. Uppercase/Lowercase
- Ctrl + U makes the selected text lowercase
- Ctrl + Shift + U makes the selected text uppercase
- Sweet!

6. Comment/Uncomment
- Ctrl + K & Ctrl + C comments out selected lines
- Ctrl + K & Ctrl + U uncomments the selected lines
- Sweet!

7. Line numbers
- Tools-> Options -> Text Editor -> Basic -> Display -> Line Numbers
- Semi-Sweet!

8. Show Whitespaces
- Ctrl+R & Ctrl+W

9. Clipboard Ring
- When you copy code it is stored to this Clipboard ring and it can store some amount of them... Then you can paste them by using Ctrl + Shift + V, which'll iterate through your copyings.
- Very Sweet!

10. Adding and removing items to the toolbar,
Rightclick on the toolbar and select Add Tab, then make a name for it, i.e. "My Snippets"
then select a line of code perhaps and drag&drop it to your custom toolbox (My snippets) then you'll notice your snippet is stored there forever, right click on it and select perhaps Rename Item and rename it to whatever you want... You can add that snippet to your code anytime later by doubleclickin' on it or dragging and dropping it.. You could also be makin' a sweet little Favorites tab of what controls you use..




I find all of these features freakin' cool and thus would like to know if there were any other features I should know of? This might also teach someone some new tricks ;)

AtmaWeapon
09-29-2004, 08:06 AM
Macros. Macros are the single most underrated feature of VS .NET, probably because they have their own namespace and you have to learn it.

My most useful macro lets me highlight a block of text, then push Alt+R. A prompt asks me for a name, and then appropriate "Region" and "End Region" directives are placed around the text. :)

What makes the macros powerful is that anything you can do with the IDE can be done with a Macro command.

Faith
09-29-2004, 02:48 PM
You wouldn't be such a nice person and show us puny little programmers how we'd go on making a macro like that Alt+R Regioning Macro of yours, or then point --->
us to some resource? I'd be very interested :cool:
Thx

shaul_ahuva
09-29-2004, 04:04 PM
Macros. Macros are the single most underrated feature of VS .NET, probably because they have their own namespace and you have to learn it.

My most useful macro lets me highlight a block of text, then push Alt+R. A prompt asks me for a name, and then appropriate "Region" and "End Region" directives are placed around the text. :)

What makes the macros powerful is that anything you can do with the IDE can be done with a Macro command.

I think I'll have to spend some time cracking down and actually learning macros -- maybe I can classify my time at work as "Training" :)

AtmaWeapon
09-29-2004, 04:05 PM
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun05302003.asp

That links to an article that contains the macro you asked about, and a few other nice ones as well.

The only real resource on VS .NET Macros I've used so far is the documentation that came with Visual Studio. I think I saw a book on it once, but I never looked too hard.

One good way to learn is to use the Macro Recorder, as it will give you an idea of how the code works.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum