inforakesha

A fine WordPress.com site

Productivity Power Tools

Leave a comment

Working With Whole Lines of Code

In a large file it is easy to get lost.  Line selection will highlight the current line (default in grey) making it very easy to see where you are:

image

You may also want to highlight an entire line of text.  Today I most typically do this by hitting Home + Home + Ctrl/Shift/End.  Now you can just triple click a line like you would do in Word:

image

Finally, I often find myself needing to move blocks of code around in a method as I change logic.  For example I may want to move some logic up in the file from:

image

to this:

image

To accomplish this now, just select the lines and hit Alt+Down Arrow or Alt+Up Arrow.  The editor will simply move the buffer and will honor new changes.  If I had stopped in the middle of the original If statement, I would have gotten the following for example:

image

Tabs vs Spaces

Some times this turns into a “Tastes Great!” vs “Less Filling!” debate on a team.  Assuming you do wind up at a standard for your team there is no guarantee that the files you own are consistent.  Now as you open a file you are warned about mixed mode and given an opportunity to fix things:

image

Colorized Parameters

Parameters are now colorized in IntelliSense making it easier to parse:

image

Alignment Helpers

Guidelines make it easy to see boundaries across an entire buffer.   Guidelines already existed in VS2010 but were harder to activate.  Now it is a simple context menu:

image

image

Guidelines are placed right at your cursor point.  You can add as many as you like for your buffer.

Another common alignment task (depending on your coding style) is getting a set of assignments to align in a readable fashion.  To do the alignment automatically, simply place your cursor at the front of a block and hit the Ctrl+Alt+] key sequence to go from:

image

to:

image

Note that this format conflicts with the default C# setting so you may need to select the option: Tools->Options->Text Editor->C#->Formatting->Spacing->”[x] Ignore spaces in declaration statements”.  (This feature is something you are more likely to use in C# as it would require disabling the VB pretty lister support)

HTML Clipboard Support

When you copy code a colorized HTML buffer is also now included (something I plan to use in this blog going forward!).  So in this example I can paste my code directly into an HTML buffer and the formatting is retained:

image

Tab Well Support

A very common feature request is to make it easier to navigate files and tab behavior.  You can now select the color for each tab by project:

image

Many other options including layout, close buttons, and sorting are available:

image

Here with a few options selected:

image

Navigation

If you hold down the Ctrl key and hover over a symbol, it will turn into a blue underlined hyperlink giving you the ability to simply click to find the definition.

New Add Reference Dialog

Many of you asked for improvements for Add Reference.  This release adds caching of results which means the dialog is typically up in a second or two as well as search enabled:

image

Summary

Now that I’ve had the productivity power tools installed I can’t imagine not having them installed.  I hope you will also find them very useful.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s