Syntax highlighting is a feature of text editors that displays text, especially source code, in different colors and fonts according to the category of terms.

learn more… | top users | synonyms

3
votes
2answers
1k views

How to print code from GitHub.com with its syntax-highlighting?

How can one print just the syntax highlighted source code from a GitHub source code page (e.g.)? I've tried it with a few browsers (Safari, Firefox, both running on OS X) but I have not succeeded in ...
0
votes
1answer
156 views

Match (highlight) invalid Hungarian notation variables syntax

We follow our own defined coding standard (Hungarian notation) as per our checklist, using Notepad++: Check that all variables are valid according to Hungarian notation identifier naming convention, ...
2
votes
4answers
554 views

Syntax highlighting in vi

I use vi in Linux to edit e.g. JSP files. The code is not syntax highlighted. I think this should be possible to enable, but I haven't found out how. Is this possible to do in vi? update1: # vi ...
7
votes
1answer
6k views

How to get syntax highlighting working in TextMate 2

I just cloned TextMate 2 from GitHub. Followed the instructions in the readme file and everything went smooth with the installation. However, there is no syntax highlighting. No problem – just need ...
2
votes
0answers
208 views

Syntax Highlighting in TextMate2 [duplicate]

Possible Duplicate: How to get syntax highlighting working in TextMate 2 I pulled TextMate2 from GitHub and built it but I can't get the syntax highlighting to work. I've installed the ...
0
votes
2answers
142 views

How do I get syntax elements to be automatically inserted on the next line in vim?

In vim, many syntax elements automatically get inserted on the next line when I start a newline. For example, if I am inside a vim file editing a comment in insert mode, when I go to the next line, I ...
1
vote
1answer
177 views

underline word in vim without changing its color

I'd like use underlined text for some syntactic groups in vim. A simple example would the Search group: :highlight Search guibg=black guifg=yellow gui=underline However, when I do that, all search ...
2
votes
0answers
601 views

Get sublime text 2 (sublimecodeintel) to parse mason

So Sublime Text 2 seems to getting a lot of love lately. I am using the Sublime Code intel plugin, for auto completion. The problem is, it does not recognize .mi files as MASON files. I looked into ...
1
vote
1answer
416 views

SQL syntax highlighting and code completion in Eclipse PDT

Is there a way of enabling highlighting (and/or code completion for SQL) for SQL syntax in PHP strings variable while developing some PHP works related to SQL using Eclipse PDT?
8
votes
1answer
1k views

Is it possible Notepad++ to change the theme based on current filetype

For example, if I open a text file, notepad++ would open it in 'default' theme. But if I open a php file for instance, it would open it in 'custom_theme1'. I know notepad++ is highly extensible, so I ...
0
votes
0answers
66 views

Change the color for a keyword in Vim for ALL filetypes

I'm using &showbreak=repeat(' ', 5) to add indentation to wordwrapped lines. What I WANT to do is add a bright red >>>> instead. How would I change all >>>> occurrences ...
3
votes
1answer
320 views

Getting rid of random syntax highlighting

I'm having a problem with Eclipse. It randomly highlights code in grey, usually as I type something. It doesn't always appear when I type, and goes away at random times too. It's really annoying. I ...
0
votes
1answer
4k views

How to completely disable syntax higlighting in Notepad++

I'm unable to completely disable syntax highlighting for Java source code files in Notepad++. I've commented out the Java sections in langs.model.xml and stylers.model.xml (even tried deleting those ...
1
vote
1answer
231 views

How to highlight the searched item in Far manager?

Whenever I search an item(F7; Shift+F7) in a file via far manager editor(F4), I have trouble finding my cursor under the found item. It takes time to find it in the lines of code. How can I highlight ...
4
votes
1answer
749 views

Sass and Haml syntax highlighting in Geany (Ubuntu)

I'm using Sass (not SCSS) and Haml, and I'd like them to be syntax highlighted in Geany rather than appear as plain text. Is there a way to enable or install this functionality?
0
votes
1answer
143 views

VIM: Highlight += with a background

I have been coding in PHP lately, which is weakly typed so integers are added with += but strings are concatenated with .=. That means that I wind up using += where I shouldn't and PHP actually then ...
77
votes
1answer
36k views

How do I get Notepad++ to associate a file type with a language? [duplicate]

I have associated .wxs files with Notepad++. So far so good. However, it doesn't remember that it should use XML syntax highlighting. How do I associate a file-type with a Language?
1
vote
1answer
3k views

No syntax highlighting in GVIM on Windows with _vimrc

My GVIM 7.3.46 install on Windows XP Professional SP3 32bit does not perform syntax highlighting if there exists a _vimrc file, at least not PHP and C. Even explicitly mentioning set syntax=php I get ...
0
votes
1answer
596 views

How to set PHP syntax highlighting in GVIM on Windows?

My GVIM 7.3.46 install on Windows XP Professional SP3 32bit does not seem to have PHP syntax highlighting. I have added this file to C:\Documents and Settings\myUsername\vimfiles\syntax and set this ...
3
votes
1answer
1k views

Vim: How to change the current item highlight color when substituting

I have changed my Vim colours so when I do a /search, every match is highlighted in bright yellow. This makes matches much easier to see. However, when I perform a substitution with the confirm flag ...
1
vote
1answer
629 views

Enabling syntax highlighting for LESS in Programmer's Notepad?

When I don't feel like firing up the Visual Studio behemoth, or when I don't have it installed, I always turn to Programmer's Notepad. It's an amazingly light and fast little text editor, with the ...
0
votes
2answers
970 views

Change language colors/syntax highlighting in gedit

When a javascript file is open in gedit, I want comments to be green instead of the default blue. How do I change the colors?
0
votes
0answers
28 views

How to make Visual Studio 2010 Express highlight identical, selected words in editor? [duplicate]

Possible Duplicate: How to make Visual Studio 2010 highlight identical, selected words in editor ? How do I get the Express version to do what's explained here: How to make Visual Studio ...
3
votes
1answer
1k views

Vim Gemfile recognition

When I open a Gemfile in vim, I don't automatically get the colors for the code. I have to do manually :set syntax=ruby. Is there a simple way to automate this ?
5
votes
2answers
5k views

Syntax highlighting in Terminal Mac OS X

How can I highlight different parts in the Mac OS X Terminal app? For example a different color for input and output? Are the pre-defined color themes I can activate/download?
2
votes
1answer
2k views

Geany: Syntax highlighting and autocomplete doesn't work unless I have the header file open in geany

I'm currently writing a program that uses the GTK library. The programs compile and run fine. The problem is - geany seems to not 'know' what structs and methods are in the GTK header file. It ...
6
votes
2answers
7k views

How to make Visual Studio 2010 highlight identical, selected words in editor ?

I would like to enable (if it exists) an option in Visual Studio 2010 that would highlight the same identical words to the selected ones. There is a feature like this already implemented e.g. in ...
3
votes
2answers
2k views

Turning on XML syntax highlighting in vim for a non-XML file

I'm using vim to browse through some log files (the file extension is .log) which contain a lot of XML. How can I turn on XML syntax highlighting after opening the file? Of course, I don't actually ...
1
vote
3answers
843 views

Syntax Highlighting for MySQL Shells?

Are there any MySQL shells that support syntax highlighting? I know in my.cnf, you can set the shell string with, for example: [mysql] prompt=(\\u@\\h) [\\d]>\\_ But is there any more ...
3
votes
1answer
5k views

Notepad++: I want to highlight questions in multiple colors?

I've written a script in Notepad++, and I want to highlight individual lines based on who is speaking. I'm just trying to find a place where I can change text color or background color for individual ...
1
vote
0answers
135 views

Vim syntax files - Ignore line prefix

I have files containing code within a prefix-based structure, such as: perl: sub abc { perl: return "def"; perl: } I'd like to be able to highlight the perl as normal. i.e. ignore the perl: ...
5
votes
4answers
3k views

Where can I find a gallery of Pygments CSS files

I googled every possible combination but I couldn't find a list of syntax files. Is there a list of good ones?
3
votes
1answer
443 views

Vim custom syntax highlighting, include other language syntax in a specified range

VIM 7.3.46 I have a custom syntax file defined for making my notes more readable. I want to define a range that will apply syntax highlighting from an existing syntax file (e.g. php, javascript or ...
1
vote
1answer
711 views

How to generate syntax-highlighted HTML from source code?

Is there a command-line tool, preferably available on both Windows and Linux, which will take a source code file as input, and generate the corresponding syntax-coloured HTML code ? I'm looking for ...
4
votes
2answers
738 views

Using vim as a filter to colorize command-line output

I love vim's syntax highlighting. It does particularly well on unified diffs, so I use it very often like that: diff -pu old new | vim - I'm aware of one tip to use vim as a better less, but what I ...
3
votes
2answers
1k views

How to highlight contexts/projects in todo.txt?

Does anyone use the todo.txt command line interface (todotxt.com)? I would like it so that when I type todo ls to show my tasks, it will highlight the +contexts and @projects with colors. How do I do ...
1
vote
1answer
640 views

Org-mode lags in highlighting source

I'm using org-mode to maintain my programming notes. This means I have lots of source code blocks, as follows. #+begin_src <language name> <code> #+end_src One thing I've noticed is ...
10
votes
3answers
2k views

How to change the syntax highlighting style in Meld

Meld 1.5.1 uses gtksourceview (via pygtksourceview) for its syntax-highlighting, however I'm unable to figure out how to configure it to use a specific style (color scheme/theme) from the ones ...
6
votes
1answer
916 views

How do you define a new language specification for color syntax highlighting in Xcode 4?

For Xcode 3 there is plenty of information available about how to define a syntax highlighting specification for a language not already supported in Xcode. But there doesn't seem to be any ...
1
vote
3answers
965 views

In Vim, how I can set a local match only for a specific filetype?

In Vimenter link description here, I can set local configuration as: setlocal number How I can set a local match only for a specific filetype? I use this: autocmd! BufEnter ...
6
votes
1answer
3k views

Modifying a gedit syntax highlighting file

I am trying to change a highlighting file from Gedit. I have modified the file /usr/share/gtksourceview-3.0/language-specs/fortran.lang because I want to change the cases in which the editor takes a ...
3
votes
2answers
2k views

How do I get Sublime Text 2 to properly color SQL even if its inside a php string?

I have the following code in a php page: <?php $query = " SELECT data FROM table WHERE param = 1 "; Since this sql is wrapped inside quotations in a php document, everything ...
2
votes
0answers
122 views

Does MSDN has syntax highligthing?

Reading the MSDN documentation in a web browser is a real pain because the absence of syntax highlighting. In those web pages, code spinets are surrounded by a div with ...
0
votes
0answers
811 views

Can you create your own language definition for syntax highlighting in Eclipse/Aptana Studio?

I usually use UltraEdit which is great at allowing custom languages, but their FTP tool sucks! I like to edit my files directly on the server in a project directory and not on my local box. Lately, ...
1
vote
1answer
1k views

Nano syntax highlighting for Debian

I am running Debian and I would like to turn on syntax highlighting for nano. My system has predefined syntax definitions... standage@idebian:~$ ls /usr/share/nano/ asm.nanorc c.nanorc ...
3
votes
4answers
2k views

LESS syntax highlighting in Geany

I'm using LESS CSS (PHP version). I'm also using Geany in Linux. Is there a LESS syntax file for Geany out there, or how I can go about editing the CSS one to suit LESS?
0
votes
2answers
57 views

Forcing highlighter to html in VI when it fails to recognize an input file

I'm having trouble editing HTML in an older version of VI(M). VIM - Vi IMproved 6.3 (2004 June 7, compiled [...] 2005). When reading .sh shell scripts there is no problem, though. It doesn't ...
4
votes
1answer
4k views

How can I add color highlighting for PHP functions?

I've recently begun using Notepad++, and have found a part of its styling functionality that confuses me. I'm currently attempting to color all of PHP's defined functions (such as count(), strlen(), ...
1
vote
0answers
183 views

Selective highlighting with netbeans

If I am working on a file that has a mix of html and php code for example is there any way to just highlight the php code when I am in a php code block and highlight only the html code when in a html ...
4
votes
2answers
121 views

Getting vi/vim syntax highlighting used by certain user

At work most web-development we do, is done in vi/vim, on a debian-server. Sometimes we have to alter some files as root, and the syntax-highlighting-model of that user (root) is absolutely awesome. ...