Add-in for vs 2010 - visual-studio-2010

Is there any add-in for vs 2010 which can format html? ReSharper can't do it.
For example. I wanna get something like this
<tr>
<td>Header1</td>
<td>Header2</td>
</tr>
instread of
<tr>
<td>Header1</td>
<td>Header2</td>

Just hit CTRL+K, CTRL+D (Format Document - works for almost any document type).

Related

Paste HTML between <code><pre></pre></code> in Visual Studio 2013

I am developing HTML lessons for a youth summer camp and I would like to copy HTML snippets from source view then paste them in design view between <code><pre></pre></code> and have Visual Studio 2013 automatically replace < > with < > accordingly.
I researched and found the article Paste Operations in the HTML Designer of Visual Web Developer and it indicates there is an additional option in the edit menu called paste alternative but as you can see in this screenshot, there is no such option. Is it possible to change a setting or something to add such an option?
I'm not sure of your Visual Studio specific feature but Try this:
http://r12a.github.io/apps/conversion/
Will "Copy as HTML" vs2013 extension will help you?
https://visualstudiogallery.msdn.microsoft.com/98fef791-eb65-4cdf-bf84-077b98c234cf

Ctrl+k, Ctrl+d not available in Visual Studio 2010 working on C++ project

I got used to use Ctrl+k, Ctrl+d for formatting whole document while in Visual Studio 2010 C# but when I changed C++ I realise that it's no longer available.
To format the document I have to select a piece of code and use Ctrl+k, Ctrl+f to format the selected code.
Can someone tell me how to enable Ctrl+k, Ctrl+d ? Is it possible ?
Ctrl+K, Ctrl+F works on code files (C++, C#, VB).
Ctrl+K, Ctrl+D works on document files (HTML, XML, XAML)
If you are annoyed by the workaround Ctrl+a, Ctrl+k, Ctrl+f because you end up at the end of your document, just add Ctrl+- to bring the cursor back to where it was before.

Shortcuts for web controls and HTML snippets in Visual Studio

Consider the feature in Visual Studio 2010 for snippets in the HTML Source view of a web page.
type a control name in plaintext with no markup or brackets!
... e.g. hyperlink.
Then hit Tab
Your web control has been auto-completed for you. It's up to you to fill in the other details that you need.
This works for form as well:
<form action="default.aspx" method="post">
</form>
This looks like a real time saver. This is supported in WebForms and ASP.NET MVC projects.
What other snippets are available in Visual Studio 2010 in the Source view of a page?
For the authoritative list of snippets, check out the VS2010 installation folders where the snippets are stored:
C:\Program Files\Microsoft Visual Studio 10.0\Web\Snippets\HTML\1033
There is one folder for ASP.NET and one for plain HTML snippets.
Also, if you use jQuery a lot, there is a set of jQuery snippets that you can add to Visual Studio as well.
Here are a ton (100's) of the short cuts in Visual Studio right from MSDN:
http://msdn.microsoft.com/en-us/library/da5kh0wa.aspx
The one thing that has been around forever but a lot of people forget about is block selection done by holding down the ALT key and use the mouse to select a block of text. Great when you want to copy/cut/delete a bunch of code that is lined up but you don't want the whole line.
Yeah, this is a really cool new set of snippets in VS2010. Here are the articles I used to learn it:
Walkthrough: Using HTML
Snippets
Using HTML Code Snippets in Visual
Studio 2010

Visual Studio incorrectly smart indents the opening brace

When I type the closing brace in an html page, this i what Visual Studio does. Notice the opening brace is now 1 indent before the foreach. They should be even as shown by the closing brace. Not a big thing but driving me nuts.
<% foreach (var item in Model.Messages)
{ %>
<% } %>
Go to Tools -> Options -> Text Editor -> [Pick your language] -> Formatting. You should find something in there.
In code view press Ctrl+E,D It will auto-format/indent your code.
When I try Ctrl+K, Ctrl+D in Visual Studio 2010 Express, it says this key combination is bound to the command (Format document) which is not currently available.

How do I get triple click to work in Visual Studio's Text Editor

Go into Notepad, Internet Explorer or most other applications that display or edit text. Triple click on some text. Windows will select the entire paragraph under the cursor.
This doesn't work in Visual Studio 2005.
How do I get triple click support in the Visual Studio text editor?
do VS 2008 or VS 2010 solve this?
Is there a macro, setting or plugin that will solve this?
I wrote an extension for this for Visual Studio 2010 that you can download from the VS Gallery or directly from the extension manager in Visual Studio, by searching for "triple click" or my name.
You can also read the blog post I wrote about it and check out the source, on github.
I haven't used it, but CodeProject has an article on SmartHelp 3.04 which mentions that you can triple click to select a whole line.
Also, from Craig Shoemaker's blog.
About VS 2010.
Further enhancements include the
ability to triple-click an expansive
element like a table and the editor
selects the entire table’s markup.
Want to surround that table with some
additional markup? Just start typing
with the table selected and your
markup is inserted around the selected
code.

Resources