In recent days, the version of vsCode has been updated. The current version is 1.43. In fact, every time I updated the version number of vsCode, I didn’t feel any obvious change, just updated daily. This time vsCode really did me a big favor.

We all know that when we write HTML pages, we often have a lot of attributes or events bound to elements, which would be ugly without a line break, so my usual practice is to have a single line for each attribute, like this:

<nz-pagination 
      [nzPageIndex] ="2" 
      [nzTotal] ="500" 
      nzShowSizeChanger 
      nzShowQuickJumper></nz-pagination>
Copy the code

But with this update, the HTML is automatically formatted as soon as I save it, and all the attributes are moved to one line, like this:

<label (click) ="changeItem('code')" [ngClass] ="{'active': activeItem == 'code'}">Hello World</label>
Copy the code

At first I tolerated it, but as more and more attributes were bound to an element I really broke down. I thought it was one of the plugins installed, but when I checked, it didn’t seem to explicitly format HTML either. So I deleted all of my 26 plugins before I got angry!

But the problem was not solved. So I focused on vscode’s plugin, which was automatically checked by vscode after the last version update.