|
2 | 2 |
|
3 | 3 | [Sublime Text][st] [syntax highlighting][ss-docs] for `.cshtml`, `.aspx`, and similar files.
|
4 | 4 |
|
5 |
| -## Current support |
| 5 | +## WebForms |
6 | 6 |
|
7 |
| -### Highlighting |
| 7 | +The old ASP.Net style pages that necessitated creation of this package. Post-Visual Basic ASP, but pre-Razor. |
| 8 | + |
| 9 | +### Current support |
| 10 | + |
| 11 | +#### Highlighting |
8 | 12 |
|
9 | 13 | - Embedded C# (`<script runat="server">`)
|
10 | 14 | + The `runat="server"` must immediately follow the tag opening.
|
11 | 15 | - `<%` expressions (including `<%=`, `<%#`, `<%:`, `<%$`, `<%--`)
|
12 | 16 |
|
13 |
| -### Functionality |
| 17 | +#### Functionality |
14 | 18 |
|
15 | 19 | - Hotkey comment/uncomment server-side comments (<kbd>Ctrl</kbd>+<kbd>/</kbd> or <kbd>Cmd</kbd>+<kbd>/</kbd>)
|
16 | 20 |
|
|
19 | 23 | + Default attributes are subject to change.
|
20 | 24 | - Snippets may require <kbd>Ctrl</kbd>+<kbd>space</kbd>, depending on your environment.
|
21 | 25 | - Some autocomplete within directives.
|
| 26 | +- Basic "Open `CodeBehind`" shortcut for frontend pages. |
22 | 27 |
|
23 |
| -### Razor syntax |
24 |
| - |
25 |
| -A huge thank-you to [@keith-hall][keith] for this! |
26 |
| - |
27 |
| -## Future support (maybe) |
| 28 | +### Future support (maybe) |
28 | 29 |
|
29 | 30 | - Identify more attributes of directives
|
30 | 31 | - Autocomplete ASP builtins
|
31 | 32 |
|
32 |
| -## Known issues: |
| 33 | +### Known issues |
33 | 34 |
|
34 |
| -- "Goto Anything" support is poor. |
35 |
| - |
36 |
| -- No recognition of excluded scopes to return to HTML. In the snippet below, the C# scope ends immediately after `"bar`. |
| 35 | +- Code blocks in CSS and JavaScript attributes that contain the opening attribute delimiter are prematurely terminated. |
37 | 36 |
|
38 | 37 | ```
|
39 |
| - <% |
40 |
| - var foo = "bar%>"; |
41 |
| - %> |
| 38 | + <p style="color: <%= "red" %>" ></p> |
| 39 | + <p onclick="<%= "alert('hi!')" %>"></p> |
42 | 40 | ```
|
43 | 41 |
|
44 |
| -- Javascript does not always recognize that `Response.Write` output is coming. The `)` is marked as invalid and the conditional scopes are never terminated. |
45 | 42 |
|
46 |
| - ``` |
47 |
| - <script type="text/javascript"> |
48 |
| - if (true && <%= list.Any() %>) { |
49 |
| - doStuff(); |
50 |
| - } |
51 |
| - </script> |
52 |
| - ``` |
| 43 | +## Razor |
| 44 | +
|
| 45 | +The simplified, less-intrusive frontend templating syntax that supplanted WebForms. |
| 46 | +
|
| 47 | +A huge thank-you to [@keith-hall][keith] for his work on this. |
| 48 | +
|
| 49 | +### Current Support |
| 50 | +
|
| 51 | +#### Highlighting |
| 52 | +
|
| 53 | +The highlighting is not exhaustive, nor is it perfect. Expect some problems. |
| 54 | +
|
| 55 | +#### Functionality |
| 56 | +
|
| 57 | +- Hotkey comment/uncomment server-side comments (<kbd>Ctrl</kbd>+<kbd>/</kbd> or <kbd>Cmd</kbd>+<kbd>/</kbd>) |
| 58 | +
|
53 | 59 |
|
54 | 60 | [pkg]: https://packagecontrol.io/packages/HTML%20(C%23)
|
55 | 61 | [st]: https://www.sublimetext.com/
|
|
0 commit comments