Home Download Buy Blog Forum Support

How to disable content highlighting

How to disable content highlighting

Postby jasonbrinks on Wed Sep 07, 2011 4:26 am

Hey, I noticed Sublime text highlights chunks of my code, like anything enclosed in a <script> tag, or everything PHP... Is there a way to disable this? I rummaged through the default file and global settings, but haven't found anything...

Its pretty annoying as it makes these blocks stick out overly much on my theme of choice...
jasonbrinks
 
Posts: 4
Joined: Wed Sep 07, 2011 4:24 am

Re: How to disable content highlighting

Postby jbrooksuk on Wed Sep 07, 2011 10:06 am

Use Notepad or Wordpad?

Do you specifically want to stop a certain scope from being highlighted?
jbrooksuk
 
Posts: 772
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: How to disable content highlighting

Postby jbjornson on Wed Sep 07, 2011 10:18 am

Not sure why you would want to remove syntax highlighting, but you can do it from the menu: View / Syntax / Plain Text. Since Build 2101 this is also available by clicking on the current syntax, which is displayed on the right hand corner of the status bar. If the wrong syntax highlighting is being used for files with a specific extension, then you can change this using the "Open all with current extension as..." option from the syntax menu.
jbjornson
 
Posts: 348
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: How to disable content highlighting

Postby jasonbrinks on Thu Sep 08, 2011 2:05 am

I'm not trying to disable syntax highlighting... Look at the attachment...

I want that highlight being applied on the <script> tag to be removed, not code hinting all by itself...

As for jbrooksuk's rather wasteful comment about using Notepad/Wordpad - I would've simply switched rather than take the efforts to make an account and post for 'help' on this forum if I wanted to. Obviously I like Sublime Text 2, and would like to continue using it. Just that this highlighting issue is quite bothersome when you're working on full PHP files (It'll highlight EVERYTHING) and HTML files with a lot of minor scripts (makes the actual html code difficult to read).
Attachments
syntax.PNG
Code block being highlighted
syntax.PNG (15.7 KiB) Viewed 2988 times
jasonbrinks
 
Posts: 4
Joined: Wed Sep 07, 2011 4:24 am

Re: How to disable content highlighting

Postby jps on Thu Sep 08, 2011 2:17 am

Change to a different color scheme that doesn't highlight the script tags, or edit the relevant .tmTheme file to remove the background highlight (search for styles that specify a background element)
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: How to disable content highlighting

Postby jasonbrinks on Thu Sep 08, 2011 4:19 am

@Sublimator - Aye cap'n, no harms be coming from this here boat... :-)

Thanks for the info, will have a good look at the theme file, and let you know when where and what changes were made to improve the situation here... Perhaps others will reference this for their own nuances... :-p
jasonbrinks
 
Posts: 4
Joined: Wed Sep 07, 2011 4:24 am

Re: How to disable content highlighting

Postby jasonbrinks on Thu Sep 08, 2011 5:29 am

Hey,

Ok, found it... In the Twilight theme (no, *that*), on line 168, is the little snippet of code I was looking for... Deleting that fixed the problem!

Thanks to @sublimator for making the option clear, and apologies to @jbrooksuk for premature misfire... :-p

The corrected code block visuals look like so:
syn2.PNG
Code block without highlight
syn2.PNG (15.58 KiB) Viewed 2924 times


And the lines that need deleting are:
source.PNG
The lines that affect the code highlight
source.PNG (10.15 KiB) Viewed 2887 times
jasonbrinks
 
Posts: 4
Joined: Wed Sep 07, 2011 4:24 am

Re: How to disable content highlighting

Postby jbrooksuk on Thu Sep 08, 2011 8:14 am

jasonbrinks wrote:As for jbrooksuk's rather wasteful comment about using Notepad/Wordpad

Learn to take a joke, cowboy.

jasonbrinks wrote:and apologies to @jbrooksuk for premature misfire... :-p

See, not so wasteful :)
jbrooksuk
 
Posts: 772
Joined: Sun Apr 11, 2010 10:37 am
Location: England


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], sammysamm, Saucebergenstein, Yahoo [Bot] and 34 guests