I suggest you ...

Break line on each tag attribute and keep them aligned in Visual Studio HTML code editor

Suppose the following horizontally lengthy `<button>` `HTML` declaration:

<button type="submit" class="btn btn-primary" id="save" name="action:@ViewContext.RouteData.Values["action"]"><i class="icon-save icon-large"></i> @Localization.Save</button>

As you see all tag attributes are inline such that they extend a long way to right in the code editor...

What I'd like to have is this:

<button type="submit"
class="btn btn-primary"
id="save"
name="action:@ViewContext.RouteData.Values["action"]">
<i class="icon-save icon-large"></i>@Localization.Save
</button>

I think the above format makes it easy to spot a given attribute although it'll clearly make the vertical scroll-bar a little longer. :)

Of course I can align it manually but then if I hit <kbd>Ctrl</kbd> + <kbd>K</kbd> then <KBD>Ctrl</KBD> + <KBD>F</KBD> by mistake I lose all the custom made formatting.

As a plus the editor could even alphabetically order the attributes. :)

<hr>

This is a feature currently implemented in the `XAML` editor in Visual Studio.

For more info, take a look at this StackOverflow question I posted about this: http://stackoverflow.com/q/14791592/114029

26 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    lenielleniel shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base