Skip to content

forkeith/SublimeSyntax-HTML-CSharp

 
 

Repository files navigation

Sublime Text syntax highlighting for .cshtml, .aspx, and similar files.

WebForms

The old ASP.Net style pages that necessitated creation of this package. Post-Visual Basic ASP, but pre-Razor.

Current support

Highlighting

  • Embedded C# (<script runat="server">)
    • The runat="server" must immediately follow the tag opening.
  • <% expressions (including <%=, <%#, <%:, <%$, <%--)

Functionality

  • Hotkey comment/uncomment server-side comments (Ctrl+/ or Cmd+/)

  • Snippets for <%-ish expressions

  • Snippets for some directives (Try page or import)

    • Default attributes are subject to change.
  • Snippets may require Ctrl+space, depending on your environment.

  • Some autocomplete within directives.

  • Basic "Open CodeBehind" shortcut for frontend pages.

Future support (maybe)

  • Identify more attributes of directives
  • Autocomplete ASP builtins

Known issues

  • Nothing yet? 🤞

Razor

The simplified, less-intrusive frontend templating syntax that supplanted WebForms.

A huge thank-you to @keith-hall for his work on this.

Current Support

Highlighting

The highlighting is not exhaustive, nor is it perfect. Expect some problems.

Functionality

  • Hotkey comment/uncomment server-side comments (Ctrl+/ or Cmd+/)

About

Sublime Text 3 syntax highlighting for HTML with embedded C#

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • ASP.NET 48.2%
  • HTML 44.5%
  • Python 7.3%