Skip to content

Instantly share code, notes, and snippets.

@AlexVKO
Created July 15, 2015 00:11
Show Gist options
  • Save AlexVKO/f25175b9b6255d692702 to your computer and use it in GitHub Desktop.
Save AlexVKO/f25175b9b6255d692702 to your computer and use it in GitHub Desktop.
Tip To highlight angular ng-* attributes in html
Open your theme file located at Packages/Color Scheme - Default/*.tmTheme
find <dict> tag containing <string>Tag attribute</string> and add section after
<dict>
<key>name</key>
<string>Tag ng attribute</string>
<key>scope</key>
<string>entity.other.attribute-name.ng</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>bold</string>
<key>foreground</key>
<string>#FFF600</string>
</dict>
</dict>
Open file Packages/HTML/HTML.tmLanguage
find section
<key>tag-generic-attribute</key>
<dict>
...
</dict>
and add section after
<key>tag-ng-attribute</key>
<dict>
<key>match</key>
<string>\b(ng-[a-zA-Z\-:]+)</string>
<key>name</key>
<string>entity.other.attribute-name.ng.html</string>
</dict>
then find
<dict>
<key>include</key>
<string>#tag-id-attribute</string>
</dict>
and add below
<dict>
<key>include</key>
<string>#tag-ng-attribute</string>
</dict>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment