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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

Vim highlight all text after multiple "#"

I am trying to make text bold if it appears after a series of # hashes. This is the line in my .vimrc: au BufRead,BufNewFile *.txt hi header cterm=cyan ctermbg=red and my attempted regular ...
3 votes
0 answers
728 views

Sublime Text: Why regex in syntax highlighting does not work?

In Sublime Text 3, a default syntax highlighting rule paints a SQL SELECT just fine if it's in the same line, but not if it's in the next line: vs After reading this question I opened the PHP ...
3 votes
1 answer
339 views

How can I disable vim's textwidth for specific lines?

I have textwidth set to 80 characters, and I have it set to 75 characters for gitcommit files. The thing is, the git commits at my company always have a last line that indicates some metadata about ...
3 votes
0 answers
2k views

In Notepad++ how can I use the Style Configurator to change my user-defined language?

I've created a user-defined language for Notepad++, including all the syntax styling. It works well. (It's actually for Markdown, FWIW.) I coded all the colors into the style when I made it. The ...
1 vote
0 answers
397 views

syntax highlighting breaks off on vim as you page up/down (on OSX terminal and iterm2)

This is a weird bug the problem is the syntax highlighting (say zenburn) on vim randomly appears and disappears as I page up and down (using ctrlu and ctrld).. for example compare these two renders ...
0 votes
0 answers
97 views

Is the coderay syntax-highlighting plugin built into redmine, or does it have to be installed separately?

I have installed a recent version of redmine - 3.3.3 but there is no syntax highlighting plugin included in the default installation. Most redmine searches mention coderay. Is that something I have ...
17 votes
5 answers
14k 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 ...
2 votes
1 answer
207 views

Dreamweaver: Auto-correct

In Notepad++ when you type a wrong tag or a wrong word, the color will stay black instead of blue. How do you set up this preference in Dreamweaver CC? Thanks.
1 vote
1 answer
205 views

Finding source of Vim syntax highlighting

I have installed Vim 8.0 on my Windows 7 and Windows 10 machines. When I edit a text file using restructured text (with a .txt extension) and use :set ft=rst, syntax highlighting starts up as expected....
3 votes
2 answers
762 views

How to set syntax enable permanently in Vim

How do I make Vim to remember the syntax enable (or syntax on) command, so I don't have to type it every time I open a new file?
2 votes
1 answer
462 views

SublimeText Markdown Extended add Roman Number Highlighting

In this question, I've inquired about how to highlight more than one markdown list punctuation item. I now want to extend the highlighting to roman numbers as well, because those are supported by ...
0 votes
1 answer
968 views

SecureCRT and Nice PHP/JS Syntax Highlighting: How To Configure?

I'm running SecureCRT using Windows 7. After googling a bit the VanDyke results came up, but I want to get it so instead of just a black background with all green text (sure it's better than the ...
0 votes
2 answers
3k 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
1 answer
818 views

combining syntax highlighting in notepad++

Is it possible to highlight two (or more) languages simultaneously in notepad++? In this particular case I am working with xml files, but in certain tags in the files I am using using python, JS, and ...
3 votes
1 answer
2k views

Custom Syntax Highlighting for AutoHotkey in Notepad++

I'm using the latest version of Notepad++ as of this post (version 7.3.3, 64-bit) with User Defined Language v.2.1.0.12. I've added syntax highlighting for AutoHotkey provided by the AHK message ...
1 vote
1 answer
397 views

How to export syntax highlighting rules from vim to vimrc format

When I analyze log files in vim I often create ad-hoc syntax highlighting rules for better orientation. For example :syntax match myerror match /NullPointerException/ :highlight myerror ctermbg=red ...
6 votes
2 answers
6k views

Vim syntax highlighting disappeared for text files (.txt)

My to-do list is a plain text .txt file that I load in Vim. In .txt files Vim has always coloured hash marks (#) and the text following them on the same line, which I use to mark out urgent to-do ...
2 votes
0 answers
387 views

Highlight comment in Notepad++ after langs.xml alteration

I am trying to fit Notepad++'s highlighting to my needs. Using MySQL most of the highlighting work is ok with the "SQL" setting under languages. I now want Notepad++ to highlight single-line ...
5 votes
2 answers
2k views

vim - how to treat three quotations in a row as a comment rather than a string

I use python and in python, three quotation marks in a row """ or ''' signify a block-comment, and a normal comment is just a hashtag. (#) I want comments to be colored grey and strings to be ...
7 votes
2 answers
3k views

Is it possible to import VIM syntax highlight into Notepad++?

VIM's got a syntax highlight file I would like to have in Notepad++. But VIM uses ".vim" files for syntax highlight definitions, while Notepad++ uses XML. At the "Import" button, you can only specify ...
1 vote
0 answers
526 views

IntelliJ / WebStorm Editor Colors not showing correctly

I'm running WebStorm 10.0.2, and for an unknown reason someday my CoffeeScript code started showing only some highlighting. I have no idea of what's going on since the settings seems to be fine. ...
21 votes
4 answers
9k views

How do I enable syntax highlighting for .bash_aliases in vim?

I'm working on reorganizing my .bashrc. I moved my aliases to .bash_aliases (which is sourced by .bashrc, but I can't figure out how to enable syntax highlighting for this file. vim seems unable to ...
1 vote
1 answer
877 views

Can Visual Studio Mark Instances of a Highlighted Variable/Function in Scroll Bar?

I'm using Visual Studio for the first time and I'm already missing a feature from Eclipse. Namely, when I select a variable or function, Eclipse would put little colored marks all throughout the ...
0 votes
0 answers
1k views

Visual Studio and syntax highlighting

I just installed the VS Syntax Highlighting pack but now have no idea how to actually apply colored highlighting to existing C# or XML code. There is no 'Quick start' guide and I have dug through ...
1 vote
3 answers
410 views

Vim doesn't highligh syntax of links

I have a markdown file with the .md extension as "Personal Note.md". I make a symbolik (soft) link of it by ln -s command in Linux as "Note". I open the link with vim, it successfully traces the ...
1 vote
1 answer
663 views

In Vim, how to split same file into different windows using different syntax hightlighting

Often, I find myself editing an HTML file with some JavaScript in it at the bottom. I use a vertical (vsp) or horizontal (sp) split on the file so I can see the JavaScript and the HTML in two ...
4 votes
1 answer
3k 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 ...
3 votes
2 answers
4k 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 ...
0 votes
1 answer
929 views

Pseudo-class selectors not highlighted in sublime text

When I use pseudo-class selectors in sublime text, the syntax does not highlight the pseudo-class selectors (mine is plain white, see screenshot). Everything works fine, it's just not highlighted. ...
1 vote
1 answer
2k views

Simple custom syntax in vim [duplicate]

I would like that for files with .vm extension vim would: colour in red all the words between two back-ticks like `this`, colour in yellow what is between two dollars like $this is in yellow$, and ...
2 votes
1 answer
1k views

Sublime 3 PHP/HTML syntax highlighting

This image sums it up. Whenever I write a PHP tag "inside" a PHP tag that ends in open brackets [if, else, for, ...], the rest of the line becomes white.
2 votes
0 answers
557 views

Sublime Text 3 PHP Syntax Highlighting Issue

Sublime Text 3 is set to PHP syntax but nesting causes some weird syntax highlighting issue as seen in the image below. I was wondering if anyone else encountered this issue and if they solved it? ...
2 votes
0 answers
342 views

Custom-defined type highlighting in Sublime Text

I am looking for a configuration/combination of plugins + clang (or any other parser) that can allow sublime text to highlight all custom defined types just like it highlights native types such as int,...
3 votes
0 answers
759 views

Is it possible in vim to search for a term excluding those appearing in comments/block comments?

For example, if I want to search for \<data\> but I want to skip any entries appearing in multi-line block comments like this: /* * Don't match comments containing the term 'data' */ I can't ...
2 votes
1 answer
299 views

Text editor for exporting syntax-highlighted code in html format [closed]

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
0 answers
337 views

Typescript syntax highlighting of strings in Solarized light

I just installed the Typescript plugin. (I tried installing through PackageControl and manually). In Solarized light, the strings (in 'single' or "double" quotes) are the same formatting as default ...
8 votes
2 answers
9k views

How can I highlight .htaccess code in Notepad++?

How can I highlight .htaccess code? I downloaded this XML file and I copy and pasted file content to userDefinedLanguage.xml inside my install directory. According to the documentation found here I ...
9 votes
1 answer
5k views

How to change syntax for a specific folder in Sublime Text 3

I write JS projects in ES5 and ES6. I installed Babel-Sublime for highlighting Babel supported code. Now, I open a .js file written in ES6, goto "View -> syntax -> Open all with current extension as : ...
12 votes
1 answer
9k views

notepad++ - Applying CSS styles for SCSS files?

In Notepad++, I have some SCSS files for which I would like the syntax to be highlighted like CSS files are. How do I do this in Notepad++? In other words, I would like to apply the same styles to ...
3 votes
1 answer
13k 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 ...
0 votes
2 answers
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 ...
5 votes
2 answers
7k views

LESS and CSS3 syntax highlighting

I found this post on SU, but it doesn't seem to address my needs exactly, so I'll ask a similar question. I normally use PSPad, and I'm also not too scared of Notepad++. They are both good editors, ...
12 votes
3 answers
9k 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 ...
15 votes
2 answers
5k 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 ...
173 votes
1 answer
118k 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?
6 votes
2 answers
14k 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 ...
14 votes
6 answers
6k views

Color coded Windows 7 Preview Pane?

Customizing what files you can preview is cool, but is there a way to create a custom preview extension to add syntax highlighting? I have many .h, .c, .cpp, .cs and .java files on my windows machine ...
1 vote
0 answers
154 views

Make part of php comment line bold in vim

I've a PHP script, and I would like to know if natively, I can make a part of a comment line BOLD. For example a comment : // it is released when you execute RELEASE_LOCK(), execute a new GET_LOCK()...
8 votes
1 answer
13k 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?...
2 votes
1 answer
3k views

Notepad++ change color of import statement in Python

Is there a way in Notepad++ to adjust the syntax highlighting for specific keywords? What I want is to be able to change the color of the import keyword in Python. I know you can create a user defined ...

1 2
3
4 5
7