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

1
vote
1answer
20 views

How to make vim truly reopen a file as a cpp file?

I have a file filename.fs with C-like syntax content. Vim opens it as a Forth source, and I use :set syntax=cpp to get the correct highlighting. But later when I try to jump between words I encounter ...
0
votes
1answer
11 views

Plaintext Syntax Highlighting and/or Custom Highlighting Syntax

How can you add custom syntax highlighting for a plaintext file? (for any filetype, not just txt) I leave this question open to any editor for those who know - I'm not picky. If you want me to be ...
2
votes
0answers
27 views

Notepad++ Syntax Highlight: How can I set a delimiter with spaces?

I'm creating my User Define Language in notepad++, and I have a delimiter set like this: open: try escape: close: : But when I type entry, the try gets highlighted, as the delimiter I've set. How ...
0
votes
0answers
17 views

Printing colorful syntax highlighting to paper

I want to print out some code on paper including syntax highlighting. After some research, I found out, that I could do this in the command line with pygments and enscript, but don't know how to ...
1
vote
1answer
22 views

Vim: Change color of window counter in tab line

How do you change the color of the window counter that VIM displays in the tab bar. I'm familiar with how to set highlighting on groups, what group applies to it? Below is an image of a vim session, ...
2
votes
0answers
10 views

Customise HTML-Kit Tools syntax highlighting

I'm using HTML-Kit tools to edit a PHP site. The syntax highlighting's really helpful, but it would be good if I could edit it, specifically so that my custom functions would be highlighted (as ...
1
vote
1answer
40 views

How do I change the hilighted length of git commit-messages in vim?

I'm of the opinion that the orthodox 50-character limit on git commit messages is absolutely ridiculous. (Primarily because I think using an 80-character wide Terminal in 2015 is equally ridiculous.) ...
1
vote
2answers
33 views

how to set .vim color scheme to vim editor OS X

I downloaded some .vim color scheme files in github and moved them by sudo mv ~.vim /usr/share/vim/vim73/colors then I wrote colorscheme ~.vim in vimrc. The original schemes already existed, are ...
0
votes
1answer
72 views

Multiple color schemes in a notepad++ text document containing multiple languages

I understand how to associate a color scheme to a certain file type, but i often run into the case where I have a shell script that is a wrapper for an SQL script. My question is can you select ...
0
votes
1answer
35 views

Vim `cpp` Syntax highlighter prematurely ends macros mid-word

FINAL EDIT: I have "manually migrated" this question to the new Vi(m) SE site: http://vi.stackexchange.com/q/2219/1060 My Vim syntax highlighter for ft=cpp is prematurely ending some macros ...
0
votes
1answer
25 views

How to configure Sublime Text 2?

So I want my Sublime Text 2 to look like this. To that end, I installed the corresponding theme and font (DejaVuSansMono). But no matter what I do, a/ the font doesn't change to what I want it to ...
0
votes
0answers
7 views

Syntax highlighting of variable interpolation in BBEdit

I'm writing PHP in BBEdit. How can I highlight variables inside strings differently from the rest of the string? For example, in "hello, $name", the $name part should have a different highlight ...
0
votes
1answer
38 views

How to permanently correct syntax highlighting after “?>”?

In Vim, I have a PHP script that contains a line similar to the following: $return = "<?xml attributes=\"values\" ?>"; Normally, the ?> characters will close an opening <?php tag, ...
0
votes
1answer
35 views

Syntax Highlighting for Column-based Language

I am working with files that have a specific character layout, i.e. bytes 1-10 bytes11-20 FirstName LastName FirstName LastName Is there anyway to specify a language that highlights or ...
-1
votes
1answer
27 views

Syntax highlight in SublimeText 2

How do I get Sublime Text 2 to highlight syntax of a language? I tried everything I could find but none of that bore any fruit. Thanks
1
vote
1answer
54 views

Turning on color syntax highlighting in Emacs

I recently installed Emacs 24.3.93.1 on Cygwin. When I first opened code in it, I got a sort of black-and-white syntax highlighting - keywords were white, function names in declarations were black on ...
2
votes
2answers
315 views

creating a simple vim syntax highlighting

i have a simple sort of a database file which consists only of entries in the following format variable=value i want to create a simple vim syntax highlighting for it and set it for specific ...
0
votes
1answer
424 views

How to syntax highlight python scripts in PHP storm

I tried installing this script but then got this error message: I'm hoping for an answer that's similar to this one but for python instead of ruby.
0
votes
1answer
85 views

Notepad++ syntax highlighting sql within php file

I love Notepad++, partly because of its syntax highlighting: in a .php file, it will highlight <script> blocks as javascript, <style> blocks as css and <?php blocks as php. Ideally ...
0
votes
1answer
22 views

Vim syntax highlighting problems with Haskell

Normally vim is very good with syntax highlighting, it hasn't given me any problems with HTML, Javascript, Python, etc., but now I'm using Haskell and it doesn't want to cooperate. Here's what it ...
0
votes
0answers
82 views

How To Enable Syntax Highlighting for Nano In Windows?

I am a huge fan of the nano editor, but I can't get the syntax highlighting to work in the windows version. Is it possible to have syntax highlighting in windows?
0
votes
1answer
42 views

Defining faces for syntax highlighting in Emacs

This is a follow-up question to Adding syntax highlighting for a comment section in Emacs. I have the following face definition adapted from the definition of font-lock-warning-face in font-lock.el: ...
0
votes
1answer
73 views

Adding syntax highlighting for a comment section in Emacs

I have the following (defun add-c-syntax-highlighting () (font-lock-add-keywords nil '( ("\\<\\(\\-+\\)" 1 font-lock-warning-face prepend) ("\\<\\(FIXME\\):" 1 ...
0
votes
0answers
51 views

Aptana Studio Custom File Extension Coloring

If I have a custom file extension, say '.cia' or '.fbi', how then can I open it up in Aptana with a syntax coloring scheme that I create? I've looked all over Aptana and I can add the file extension ...
1
vote
1answer
34 views

How can I properly interpret M4's $# variable without starting comment syntax in emacs?

I have the following M4 macro definition: define(`printlist',`$1`'ifelse(`$#',1,,`printlist(shift($@))')') # does begin a comment in M4 syntax, but only when it isn't preceded by a $: $# is the ...
2
votes
2answers
31 views

syntax on, syntax enable, vim

I am trying to find out how to make vim to remember the syntax enable command so I don't have to type it every time I open a new .c file. I bet there is a way, I tried looking at the documentation for ...
0
votes
1answer
272 views

Installing vim syntax highlighting for C++11\14

I have a fresh installation of Manjaro linux 0.8.10 with vim 7.4 installed, and I'm unsuccessfully trying to enable syntax highlighting for c++11/14 using the script by Michael Small (which I've been ...
0
votes
0answers
61 views

Cygwin nano syntax highlighting

I want to have basic syntax highlighting in a cygwin implementation of nano. This comment confirms for me that it's possible, but I can't find any information on how to actually make it happen.
0
votes
1answer
207 views

How to make smart highlighting case sensitive in Notepad++

According to the release notes for Notepad++ 6.1.7, the smart highlight feature has an option for being case sensitive. How do I enable the case sensitive option?
0
votes
1answer
346 views

Notepad++ Using User-Defined Language to highlight a substring

I'm working with a programming language without a proper IDE and I'm using notepad++ as my editor. I've set up a user-defined language and it's working pretty well, but I have a problem in that if ...
0
votes
0answers
31 views

Can I use Doxymacs to highlight its comments differently?

Is there a way to change the face of comment text when it's inside of Doxygen-active comment syntax? /** * long comment */ /// short comment For the second one (since it's a little easier), I've ...
0
votes
1answer
195 views

How to stop Vim markdown syntax from highlighting as italic asterisks used to denote bold?

Using Vim 7.4 on Windows in ConEmu (though I have seen the same thing on other platforms/setups), I notice that the syntax highlighting is matching the beginning and ending double-asterisks as italic ...
0
votes
1answer
46 views

The Vim documentation illustrates a “wrong way” to add comments to HTML. What's wrong with it?

The "syntax.txt" chapter in the official Vim documentation says: HTML comments are rather special (see an HTML reference document for the details), and the syntax coloring scheme will highlight all ...
1
vote
0answers
57 views

In Sublime Text 2, how do I highlight any code which is between <?php and ?>

I'm coding in php for a Wordpress project at the moment and using Sublime Text 2. It's great, however, I would love to be able to quickly see what is php and what is html (also javascript, but that is ...
0
votes
0answers
12 views

How can I trick nxml-mode into accepting <<…>> as comment syntax?

I'm using org-babel to create an XSL template and would like to use the tangling capabilities. Since as far as I'm aware <<…>> isn't valid XML anyway, I would like to add it as comment ...
0
votes
1answer
408 views

User Defined Language Notepad++

I'm stuck in defining my language in Notepad++ for syntax-highlighting. I would like to define different colors for different output files that i get from a software. The usual string is: @--MESSAGE ...
0
votes
1answer
16 views

getting yml syntax highlighting in textmate2

I ignored the prompt of textmate2 to to associate yml files with yml by mistake, and instead chose .txt. the result is no syntax highlighting and i can't figure out how to fix it. Installing and ...
1
vote
2answers
78 views

Edit vim syntax highlighting options for a specific file type

When I edit a .markdown file in vim, the highlighting looks like this: I am using a light colour scheme and the builtin vim .markdown settings (no plugins - I found them to be worse). The problem ...
0
votes
1answer
60 views

Highlight endif in vim

I'm creating a colorscheme for vim and want to give the ifand endif distinct colors. I followed the tutorial on vimcasts and have the following file "set 256 colors for gnome-terminal if $COLORTERM ...
2
votes
0answers
221 views

Sublime Text 3 - Detect syntax based on file header

How would I get Sublime Text 3 to recognize file type (i.e. set syntax and build system) based on a files header? For example: If the first line of a file was <!DOCTYPE html>, it would be ...
1
vote
1answer
56 views

Slickedit: How can I set the language of the currently open file if it has no extension?

I'm working on a file without an extension in Slickedit (over Linux). Because it has no extension, Slickedit doesn't identify what language the file is written in. Is there a way to manually define ...
1
vote
0answers
84 views

Importing pygments' highlighting to vim

Usually, vim does very good job in highlighting, using the packaged syntax files. Unfortunately, it does bad job with MySQL. At first, I looked everywhere for a better MySQL vim syntax file, with no ...
0
votes
1answer
89 views

Text editor for exporting syntax-highlighted code in html format

Long time along I used to export syntax-highlighted code from a certain text editor on the linux platform. The idea is that it maps all the syntax-highlighting, like color, boldness, italics, indent, ...
0
votes
1answer
666 views

Why none of the rainbow parentheses plugins work with filetype=php?

I've tried a dozen rainbow plugins. They all work, until i open a php file or set filetype=php. Then I get parentheses with the same color in that buffer. what is the reason for this? I tried ...
2
votes
1answer
76 views

Syntax highlighting for emails

I'm once in a while sending raw code to customers. Is there a tool which adds (inline) styles to code, so that it is easier to read for my customers? A tool which works for gmail and other web-based ...
0
votes
1answer
55 views

In Vim, why does searching “/A\n\zsB” work, but not syntax highlighting “:syn match Statement 'A\n\zsB'”?

Assume the following text file: A B Or in other words, a file containing only the string A\nB. Let's see if I can match any B preceded by A and a newline. Simple enough. I can do this sucessfully ...
0
votes
2answers
693 views

objective-c syntax highlighting for vim

I would like to have an excellent syntax highliter for obj-c that matches or beats the one in my xcode.. I've installed base16 through yadr, and i've also installed cocoa.vim to have better syntax ...
1
vote
1answer
66 views

MS Word custom style displays white separator lines

I am trying to setup a custom style within MS Word 2013 that would display code snippets. So far everything is alright, except there are white separator lines on every 2nd line. I have searched quite ...
0
votes
0answers
47 views

Copy Sublime Syntax from one theme to another

I like to use Sublime Text 2, but the theme I use (Pastels on Dark) doesn't have the syntax for certain key words in C#. As I understand it the theme is linked to the syntax (or visa versa) Below are ...
0
votes
1answer
914 views

How do I disable syntax checking for a specific file extension?

I recently installed Dreamweaver CS6, and I'm having a problem when modifying a JSON file. No matter what I type, even the simplest, clearly valid JSON string, it keeps saying there is a syntax error ...