1

I just switched from version 2 to version 3. On ST2, I tweaked the .PY file under the HTML package to achieve a custom auto-indentation like so:

<my_tag>

    My Text

</my_tag>

Which is basically:

<my_tag>
(blank line)
(tab)My Text
(blank line)
</my_tag>

It's my personal preference to write HTML that way. On ST3 however, there don't seem to be any .PY files . So I'm stuck with the following default auto-indentation:

<my_tag>
    My Text
</my_tag>

How do I get my custom HTML auto-indentation to work on ST3?

Junaid Bhura
  • 317
  • 2
  • 11
  • Thanks Matt! This is really helpful! However, I fixed my problem by using key binding http://stackoverflow.com/questions/15750978/auto-indent-new-line-when-hitting-enter-to-expand-one-line-tag-in-html . I remembered that I had done my HTML formatting in this way, and my CSS formatting using .PY files . So thanks! – Junaid Bhura Apr 04 '14 at 04:23

1 Answers1

1

In ST3, packages are kept in the Installed Packages directory (sister to Packages) as .sublime-package files, which are essentially just ZIP files. The easiest way to deal with them is to install the excellent PackageResourceViewer plugin. Once installed, open the Command Palette and type prv to bring up the PackageResourceViewer options. Select Extract Package and a list of available packages will appear. Scroll down to HTML (or just type html), click on it or hit Enter, and it will be extracted into Packages/HTML. You should then be able to open and edit the appropriate .py file from there.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
  • May be worth mentioning that you can use the "Open Resource" command to open the file, make your edits, then save. The file will be placed in Packages/HTML in the proper location to override the default files. Both solutions work though as they both place the files in the proper location to override the packaged files. – skuroda Apr 03 '14 at 00:37
  • @skuroda - true, but I've come to like using the `Extract Package` option for tasks like this, because sometimes you need to look at/edit multiple files, and this does it all in one step. You just need to remember to check the contents of new packages in case anything is upgraded with new builds (which are rather few and far between lately...) – MattDMo Apr 03 '14 at 00:56
  • Agreed, simply pointed it out for the sake of being complete. – skuroda Apr 03 '14 at 03:54
  • Thanks! This is really helpful! I've added a comment to my question so people can see it better. – Junaid Bhura Apr 04 '14 at 04:21