Tall text 3 correct indent for custom HTML element

I use sublime text for an ion project. Usually we will have all those custom elements like:

<ion-view view-title="Playlists">
  <ion-content>
    <ion-list>
      <ion-item ng-repeat="playlist in playlists" href="#/app/playlists/{{playlist.id}}">
        {{playlist.title}}
      </ion-item>
    </ion-list>
  </ion-content>
</ion-view>

The problem is that the sublime text does not seem to work with these custom elements in the indent. If I select all the code above and do reindent ( Edit → Line → Reindent), the indentation will become useless.

How can I get the right digression for this case? Any plugin to use?

+4
source share
1 answer

I would recommend HTML-CSS-JS Prettify .

And then you can use:

Ctrl+Shift+H (or Cmd+Shift+H if you're on a Mac).

- or -

Right click in the current buffer and select HTML/CSS/JS Prettify -> Prettify Code.

JS JSCS-Formatter.

+4

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


All Articles