Home Download Buy Blog Forum Support

Code coloring for html tags like TABLE and INPUT

Re: Code coloring for html tags like TABLE and INPUT

Postby Fatbat on Thu Mar 20, 2014 6:25 am

Anyone know how to get custom colouring working in ST3? I've done the exact same thing as I have done in ST2 but it's not working.
Fatbat
 
Posts: 70
Joined: Sun Feb 19, 2012 6:54 pm

Re: Code coloring for html tags like TABLE and INPUT

Postby FichteFoll on Fri Mar 21, 2014 5:27 am

Syntax definitions and color schemes work exactly the same way as they did in ST2. The only difference is how packages are handled.

Check https://www.sublimetext.com/docs/3/packages.html and https://sublime.wbond.net/docs/customizing_packages and use https://github.com/skuroda/PackageResourceViewer to extract the files to the right locations. You should be able to use that plugin and just save the file when you are done and it should have the correct name (and folders are automatically created). Remember that you need to do this with both the syntax definition and the color scheme - and a restart won't hurt. You can test if the syntax definition works by inspecting the scope of the tag in question. If it's working as expected, chances are you did something wrong with the color scheme.
FichteFoll
 
Posts: 388
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany

Re: Code coloring for html tags like TABLE and INPUT

Postby valerij_ on Sun Mar 23, 2014 3:56 pm

colorcoder does color each html tag in a different color
valerij_
 
Posts: 39
Joined: Fri Feb 14, 2014 5:59 pm

Re: Code coloring for html tags like TABLE and INPUT

Postby Fatbat on Thu Mar 27, 2014 12:23 pm

FichteFoll wrote:Syntax definitions and color schemes work exactly the same way as they did in ST2. The only difference is how packages are handled.

Check https://www.sublimetext.com/docs/3/packages.html and https://sublime.wbond.net/docs/customizing_packages and use https://github.com/skuroda/PackageResourceViewer to extract the files to the right locations. You should be able to use that plugin and just save the file when you are done and it should have the correct name (and folders are automatically created). Remember that you need to do this with both the syntax definition and the color scheme - and a restart won't hurt. You can test if the syntax definition works by inspecting the scope of the tag in question. If it's working as expected, chances are you did something wrong with the color scheme.


As I said in my previous post, I've done exactly this. I used PackageResourceViewer to open the HTML package and to edit HTML.tmLanguage, add the code that I previously posted, which works perfectly in ST2, saved it, restarted, nothing happens. I'm using the exact same color scheme for both ST2 and ST3 which has these new colors defined.

ST-2

Image

ST-3

Image

valerij_ wrote:colorcoder does color each html tag in a different color


I want to specifically change just a couple of HTML tags in my scheme. I do not want to apply a rainbow of colors and wholesale changes to my theme (including backgrounds, line numbers, tab indicators, etc.) so it no longer looks even remotely the same.
Fatbat
 
Posts: 70
Joined: Sun Feb 19, 2012 6:54 pm

Re: Code coloring for html tags like TABLE and INPUT

Postby Fatbat on Tue Apr 08, 2014 12:20 pm

Anyone?
Fatbat
 
Posts: 70
Joined: Sun Feb 19, 2012 6:54 pm

Re: Code coloring for html tags like TABLE and INPUT

Postby qgates on Wed Apr 09, 2014 1:05 am

.sublime-package files are effectively just ZIP files with a different extension. If you open a file contained within a ZIP and just hit "save" it'll probably be saved somewhere else. Just a thought; did you open up the sublime-package file again to make sure the changes you made have been updated in the ZIP file?

Another option is to save the modified HTML.tmLanguage file in your User folder. Sublime will pick up files in there - tmLanguage, python scripts and configs - and use them in preference to files stored elsewhere. For example, I use a modified Soda Dark.tmTheme file that's just saved in my User folder. AFAIK, tm*** files are unchanged between ST2 and ST3, so anything you do in ST2 tmLanguage files should work equally in ST3.

A third suggestion by way of investigation, is to take a copy of your working ST2 HTML.tmLanguage file and drop it in your User folder for ST3 in its entirety.
qgates
 
Posts: 209
Joined: Mon Nov 05, 2012 4:33 pm

Re: Code coloring for html tags like TABLE and INPUT

Postby becker101 on Wed Apr 16, 2014 2:59 pm

I'm not sure if this helps or not. The primary difference between ST2 and ST3 is ST2 is written in Python2 and ST3 is written in Python3. Some of the packages don't work in ST3 because of the upgrade. This may be why your ST2 code doesn't work in ST3. Just a guess on my part.

viewtopic.php?f=3&t=14020&p=53396&hilit=package+control+not+working#p53396
becker101
 
Posts: 4
Joined: Tue Apr 15, 2014 3:41 pm

Re: Code coloring for html tags like TABLE and INPUT

Postby Fatbat on Wed Apr 16, 2014 4:57 pm

Thanks for the feedback folks. When I've got a bit more spare time I'll take another crack at it.

Cheers.
Fatbat
 
Posts: 70
Joined: Sun Feb 19, 2012 6:54 pm

Previous

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 8 guests