SlickEdit Community

Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2017 v22 Beta Discussion => Topic started by: guth on September 13, 2017, 10:07:46 AM

Title: HTML beautification problems
Post by: guth on September 13, 2017, 10:07:46 AM
HI,

I'm doing some Vue.js development and am writing js inside script tags in a HTML file.

Say the file looks like below. If I place the cursor on "vm =" line and press TAB nothing happens, but if I select the script tag and its contents and then select beautification, then everything inside the script tags get indented, which I expected from the tabing.
<html>
<head>
    <script src="https://unpkg.com/vue"></script>
</head>
<body>
<div id="app">
    <text v-model="greeting"></text>
</div>
</body>
<script>
vm = new Vue({

});
</script>
</html>


Further, say that the script tag now looks like below, and then after "data:" one presses { to start writing some vue variables, then the line above gets misaligned.

<script>
vm = new Vue({
   el: "#app",
   data:
});
</script>

The script tag ends up in:

vm = new Vue({
el: "#app",
      data: {
   }
});


If now selecting the script tag and its contents and selecting beautification, it ends up with:

<script>
   vm = new Vue({
      el: "#app",
      data: {
      }
   });
</script>


which is much nicer!
Title: Re: HTML beautification problems
Post by: guth on September 13, 2017, 10:09:24 AM
Forgot to add that when selecting the script tag and its contents, and running beautify, then a line is added above the start script tag.
Title: Re: HTML beautification problems
Post by: patrick on September 13, 2017, 01:25:12 PM
I can reproduce the editing problem with tab.  Not the brace one.  Can you post the user.cfg.xml file from your config directory so I can compare our settings?  I'm guessing a difference in our settings is why I don't get that behavior adding the '{'.
Title: Re: HTML beautification problems
Post by: guth on September 14, 2017, 05:42:27 AM
How do I send you the user.cfg.xml file?
Title: Re: HTML beautification problems
Post by: Clark on September 14, 2017, 01:13:32 PM
You can post it here. It's always pretty small.
Title: Re: HTML beautification problems
Post by: guth on September 14, 2017, 01:45:41 PM
Mine is 250 KB so I can't do that.
Title: Re: HTML beautification problems
Post by: SlickEdit Support on September 14, 2017, 02:02:28 PM
You can add the file as an attachment to your post.

SlickEdit Support
Title: Re: HTML beautification problems
Post by: guth on September 14, 2017, 02:18:59 PM
I first tried to send a PM to patrick, but didn't find any attachment function.
Title: Re: HTML beautification problems
Post by: patrick on September 15, 2017, 04:20:24 PM
Got it, thanks.  I'll take a look at it.