Subscribe to How-To Geek

Disabling Syntax Highlighting in Firefox's View Source Code

When you go to view the source code of a website in Firefox, the code is syntax highlighted like in the screenshot below. Some people seem to love syntax coloring, while others are annoyed by it. And while there are no options in the Firefox Preference menu for disabling it, the more advanced about:config will allow you to disable syntax highlighting in the source code.

colored.png

1. In the location bar, enter about:config and press enter.
2. In the new page that appears, there should be text field labeled Filter. In this, type in view_source.syntax_highlight and then press enter.

filtering.png

3. Double click anywhere on the entry's line. It should become bolded and read False under the Value column.

falsify.png

Now you can try going to View>Page Source on any page as you normally would. You should see the lack of syntax coloring, such as below with the about:config page itself. No restarting Firefox required.

simpler.png

If you pefer to not have syntax highlighting anywhere, you can disable it in Emacs and Vim as well.

This article was written on 10/21/07 and tagged with: Firefox

Daily Email Updates

You can get our how-to articles in your inbox each day for free. Just enter your name and email below:


Name:
Email:

Comments (4)

  1. TipsoSaurus

    Hey that's cool. However, I'm one of those who like syntax highlighting. Coz, it makes life simpler and doesn't look monotonous at all :)

  2. Jake

    @TipsoSaurus: Maybe I'm unusual, but when coding I prefer synatx coloring, but when just quickly skimming through code (usually all I do from Firefox), I'd rather not have it.

  3. Alex

    Can you tell me why MY source code appears in a really strange font?

    http://www.pixel-air.co.uk/view_source.gif

    I've done everything to try and reset it! Firefox 3 bug?

  4. Bob Dole

    1 - Open the source page you want without syntax highlighting.

    2 - Click "View" in the top left.

    3 - Click "Syntax Highlighting".


Leave a Comment




Leave your friendly comment here.

If you have a computer help question, click here to leave it on the forums instead.

Note: Your comment may not show up immediately on the site.

Sponsored Links
Getting Started
About How-To Geek
What Is That Process?
svchost.exe
jusched.exe
dwm.exe
ctfmon.exe
wmpnetwk.exe
wmpnscfg.exe
rundll32.exe
wfcrun32.exe
Ipoint.exe
Itype.exe
Wfica32.exe
Mobsync.exe
Cmd.exe
Dpupdchk.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. All Rights Reserved.