ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

HTML (C#)

by michaelblyons ST3

Sublime Text syntax highlighting for HTML with embedded C#: WebForms/ASP.Net and Razor

Details

  • 5.0.0
    4.0.0
  • github.​com
  • github.​com
  • 4 months ago
  • 4 hours ago
  • 9 years ago

Installs

  • Total 12K
  • Win 10K
  • Mac 2K
  • Linux 896
Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9
Windows 0 0 0 0 0 0 0 1 0 0 0 1 1 0 1 0 0 1 0 2 0 1 0 0 1 0 1 0 1 0 0 0 0 0 1 0 0 0 3 0 1 0 0 0 0 2
Mac 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1

Readme

Source
raw.​githubusercontent.​com

HTML (C#)

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+/)