Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [syntax-highlighting]

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.

9
votes
2answers
3k 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
948 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
3k 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
32 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 2010 ...
4
votes
1answer
2k 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 ?
6
votes
2answers
8k 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
3k 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 ...
7
votes
3answers
9k 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 ...
7
votes
3answers
5k 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
2k 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 ...
4
votes
1answer
14k 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
216 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: ...
13
votes
4answers
8k views

Where can I find a gallery of Pygments CSS files [closed]

I googled every possible combination but I couldn't find a list of syntax files. Is there a list of good ones?
4
votes
1answer
1k 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 ...
2
votes
1answer
2k 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
886 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
2k 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 ...
2
votes
1answer
986 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 ...
14
votes
5answers
7k 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 ...
7
votes
1answer
2k 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 ...
3
votes
3answers
2k views

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

In Vim 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 *.py,.vimrc,*.sh,*.c* :match ColorColumn /\%>...
9
votes
1answer
4k 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
3k 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 shows ...
2
votes
0answers
136 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 class="codeSnippetContainerCode"...
0
votes
0answers
1k 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, I'...
1
vote
1answer
2k 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 ...
5
votes
3answers
4k 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
63 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 ...
5
votes
1answer
6k 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
220 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
136 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. ...
1
vote
2answers
892 views

PowerShell ISE as C editor (like gEdit with embedded terminal)?

I've just discovered PowerShell in Windows 7 and realised that it comes with an ISE too. In Linux, I use gEdit with an embedded terminal when writing C programs and I've been looking for an ...
0
votes
1answer
221 views

ANSI Colors & Syntax

Is there a mapping of ANSI colors to their syntax in a given shell? For example, in BASH, Blue seems to be Folders and Green seems to be executable files. Does a list exist for what ANSI colors mean ...
2
votes
1answer
338 views

Creating Custom Code Syntax Highlighting Color Themes

I've come across a couple of websites that have been very helpful in allowing people to create custom color themes for their favorite IDE's. Visual Studio themes Eclipse themes Is there a similar ...
0
votes
1answer
281 views

TextMate indentation “navigation” as in Notepad++

I want to duplicate the function from Notepad++ where you can easily view your indentation in your code. I want the dotted border that is lined within the indent. Is there a plugin for this? Or can ...
34
votes
2answers
18k views

Is there any way to get bash to have syntax highlighting like fish?

In the fish shell, the actual command line is syntax highlighted: Is there any way to get this same behavior in bash? There is something just like this but for zsh, not bash. Is it possible that ...
2
votes
1answer
3k views

How can I add HTML5 support to Vim without plugins?

I'm using OS X, but I don't think that matters. By default, both MacVim and [terminal] Vim handle auto-indentation of HTML 4.0 elements, but any HTML5 elements, such as <header> and <footer&...
2
votes
1answer
798 views

emacs smart html syntax highlighting

Is there a syntax highlighting mode for xml/html which supports highilghting of markup associated with given (just like for parentheses)? For example if I select 'div' markup - this 'div' and ...
2
votes
2answers
6k views

How to change the default highlight color of a property in the Aptana-pydev?

The default text highlighting and default font colors that came with Aptana (Eclipse) seems to be a little wacky, anyone have any idea how to fix this? This example isn't the only place where stuff ...
1
vote
1answer
2k views

Vim on Solaris. Coloured syntax highlighting?

I spend a lot of my time in vim, usually on some sort of debian/ubuntu OS. I've recently started playing with a Solaris 11 Express server and wondered if it's possible to enable coloured syntax-...
2
votes
1answer
551 views

Which Mac/PC text editing programs have YAML syntax support?

I write/edit a lot of YAML syntax files, and syntax highlighting really helps determine where I have syntax errors in a YAML file. Recently I've added two contributors who are not too familiar with ...
7
votes
1answer
12k views

How do I create my custom “User-Defined” language in Notepad++?

In Notepad++ there is a menu option: Language->"User-Defined". How do I customize that? What are capabilities of such option? Can I highlight date/time? Can I highlight 21-29th symbols in the lines?...
1
vote
2answers
3k views

eclipse .conf files coloring syntax (highlighting)

I haven't found an easy way to add a simple syntax to Eclipse, regarding conf files. I took a look at xText, but seems really complex for something really simple. I basically want to color the lines ...
2
votes
1answer
1k views

How let Scite support a custom syntax highlight template?

I need to have a syntax highlighter for a language of mine. I really like Scite, so I was wondering how to support a custom syntax with it.
2
votes
1answer
9k views

How can highlight all the automatic-fields or only references in Microsoft Word 2010+?

Is there any way that I can highlight, to quickly check, all the internal references in a word document? The current version that I'm working with is Office 2010 on Windows or Office 2011 on a Mac ...
14
votes
2answers
8k views

Is there a way to have syntax highlighting or code blocks with Evernote?

How do you take notes on code snippets and or command line sequences in Evernote (Mac or PC)? Is there a way to have code blocks like the 'Code Sample' buttons here: example Any way to have colored ...
18
votes
3answers
12k views

Different language syntax highlighting within same file

I'm trying to get simple syntax highlighting working within a file. Here's the setup. I have an index.php file, which Notepad++ correctly highlights any PHP code between the <? and ?> tags. ...
0
votes
2answers
1k views

How do I get Dreamweaver to deploy syntax highlighting for full script CFC's?

Is there a way to get Dreamweaver CS4 to use syntax highlighting when writing full script CFCs? If the document type is .cfc and they syntax is fullscript, there is no syntax highlighting; the code ...
2
votes
1answer
462 views

What is Christmas Tree Mode in Emacs?

Reading python-mode mailing lists, I've seen something I haven't heard of in a posting: [...] I can't get all syntax highlighting to work, most particular variable highlighting. I have christmas ...
9
votes
2answers
1k views

Multiple foldmethods in vim

I use the folding option of vim quite a lot, and have usually set foldmethod to syntax. Recently I discovered that it is possible to add custom folds, such that I can put whole blocks in /*{{{*/ and /*...