Special color markup for angular -templates in sublime text?

I am looking for syntax markup for angularJS. For instance:

  • Special double-caliber coloring {{mytag}}
  • Special coloration of any attribute starting with ng- ...

I have already tried this package . It has html (angular) syntax, but it does nothing.

+6
source share
1 answer

I recycled a bit of the HTML.tmlanguage file to do something like this.

HTML (angularjs) .tmLanguage

you can upload a file from my SublimeText2-Userfiles repo on github

Here's how to use it:

  • Copy the file to your user folder, and then, while you open the angular.js template file, click the "Syntax" button in the lower right corner of the line with a high level of text. choose User> HTML (Angular.js)

  • You should also update the color scheme to add color highlighting for special angular areas. You can check my personal color scheme in the same repo here . I think all you need is something like that.

      <dict> <key>name</key> <string>Angular</string> <key>scope</key> <string>entity.other.attribute-name.angular.html, source.angular.embedded.html</string> <key>settings</key> <dict> <key>foreground</key> <string>#FF3A83</string> </dict> </dict> 

Remember, this is just a dirty hack to ease my personal process. I would appreciate it if you would do your part and do it better. It requires a lot of improvement, but that is almost all you wanted.

+9
source

Source: https://habr.com/ru/post/953900/


All Articles