Web 2.0 ASP.NET

A Blog about ASP.NET, MVC, Web 2.0, AJAX, SQL server and other web technologies.
Helping the little guy win!

ReSharper Zen Coding

ReSharper Zencoding Powertoy

I have to say I am really blown away with the new ASP.NET features in ReSharper 5 but in addition to all the goodness, like a really cool html/aspx/ascx navigator and related files navigation. There is a little gem I found this week that I wanted to share with you.

Zen Coding

Those of you familiar with Zencoding will know that it is an editor plugin for writing HTML at warp speed which also works for XML and XSL (or any other structured code format for that matter). Essentially it is a powerful abbreviation engine which allows you to expand expressions like CSS selectors and produce HTML code as a result. What this means is that you can write something like:

div#div1>ul>li*3

And Zen Coding will spit out









Zen Coding Hello World

Ok, so if you don't already have ReSharper 5 drop over to the Jetbrains site and get a free trial here:
Resharper 5 Download

After you have installed ReSharper 5 (or if you already have it installed) get the Powertoys for Resharper over at Codeplex here:
Powertoys for Resharper Download

And install the Zen Coding Powertoy, that's it you're good to go, open up a ASPX file and try the above example:

div#helloworld>ul>li*3

All you do then is use the ReSharper Zen Coding shortcut alt + f

and that's it job done. Some have commented that you get a line of unformatted html generated, but that is simple to fix, select/highlight the line and use the format html shortcut in Visual Studio ctrl + k + f and you get a nicely indented block of HTML.

Of course this example is just the tip of the iceberg and there is a great starter article for Zencoding here:

Zencoding Quickstart tutorial

0 comments:

Now Reading







Microsoft Store

Microsoft Store

Disclaimer

All data and information provided in THIS blog is for informational purposes only. I make no representations as to accuracy, completeness, currentness, suitability, or validity of any information on this blog and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use. All information is provided on an as-is basis. All code may be used under the standard UIIYW BDBMIITDW license (Use It If You Want But Dont Blame Me If It Doesnt Work) :)