Questions tagged [syntax-highlighting]

Syntax highlighting is a feature of some text editors that display text (especially source code) in different colors and fonts according to the category of terms.

Syntax highlighting is a feature of some text editors that display text (especially source code) in different colors and fonts according to the category of terms. For example, any given language will have certain repeating elements like strings, variables, functions or other keywords that can be color-coded to improve readability. It is used to identify syntax errors in the code and to make reading the code more visually appealing.

3594 questions
68
votes
3 answers

How to set scss syntax in Sublime 3?

I'm using Sublime 3 editor. When I open a SCSS file it shows many red characters because it misjudged the syntax. When I press CTRL + Shift + P and type sass or scss I get no option. I had to set syntax to CSS. Is there any way to set syntax to…
user31782
  • 7,087
  • 14
  • 68
  • 143
66
votes
6 answers

How do I edit the Solarized (Light) theme in Sublime Text 3

I am trying to edit some of the syntax colours in Sublime Text 3. I'm using the Solarized (Light) built in colour scheme but I only want to change a few of the colours. Where is the settings file (on a Mac)?
Jack Barham
  • 3,197
  • 10
  • 41
  • 62
64
votes
7 answers

Enabling Git syntax highlighting for Mac's terminal

I miss the Git syntax highlighting I had on Windows for every "git .*" command like green staged filenames, some bolding, etc. How do I enable Git syntax highlighting for Mac's terminal?
thewillcole
  • 2,943
  • 3
  • 30
  • 35
61
votes
8 answers

How to: C# source with syntax highlighting on PowerPoint slides

I would like to show some C# source code in a PowerPoint presentation. But how can I copy the code including the syntax highlighting onto the slides? I could make screenshots, but that has some drawbacks (ugly, font size, unmaintainable). Do you…
John Dorian
60
votes
7 answers

CodeMirror 2 - Highlight only (no editor)

Can CodeMirror 2 be used to highlight code from a DIV or PRE tag (without the editor)? Like CodeMirror 1 used to be able to do with the hightlightText() function? For example here: http://codemirror.net/1/highlight.html, after you press run…
Alex
  • 66,732
  • 177
  • 439
  • 641
57
votes
11 answers

Eclipse highlighting the same occurrence of the word

In Notepad++, it has a very nice feature that if I select a word, it will highlight all the same words throughout the text. I can also set the hot-keys to highlight up to five different words with different styles (See the effect below) . Is…
Ken Chan
  • 84,777
  • 26
  • 143
  • 172
57
votes
9 answers

Vim Syntax Highlighting does not work

I've installed a fresh Arch Linux system on my laptop and downloaded the vim package. I haven't altered the .vimrc file, but the syntax highlighting doesn't seem to work with any of the languages I tried (Python, Ruby, CSharp, C...). Auto formatting…
Gilad Naaman
  • 6,390
  • 15
  • 52
  • 82
55
votes
3 answers

In vim, how do I highlight TODO: and FIXME:?

In vim, FIXME and TODO are highlighted, but I can't get FIXME: and TODO: (note the colon after the keyword) to highlight? What should I put in my .vimrc to make this happen?
Paul Biggar
  • 27,579
  • 21
  • 99
  • 152
55
votes
2 answers

Kotlin: Why are most variables underlined in Android Studio and how do I turn that off?

I wanted to know why most variables in Kotlin are underlined. Some files contain a lot of underlining which is very annoying. If I hover my mouse over a variable it doesn't give any information most of the time. But on some it says "This property…
Kevin van Mierlo
  • 9,554
  • 5
  • 44
  • 76
54
votes
7 answers

How to see a large JSON file pretty printed on Ubuntu?

I would like to hear your suggestions on how to handle a large (40MB) JSON file on Ubuntu. I would like to see it pretty printed in vim or gedit or any other editor. One can find numerious tutorials on how to prettify the JSON, however, they do not…
JJD
  • 50,076
  • 60
  • 203
  • 339
53
votes
9 answers

Notepad++ not syntax highlighting my files

Until a week ago I was happily coding html.erb files in Notepad++ with syntax highlighting. Then my hard drive crashed. I reinstalled Notepad++ on my new system but when I open my html.erbs, only a few of them are highlighting properly. I think the…
sscirrus
  • 55,407
  • 41
  • 135
  • 228
53
votes
4 answers

Twig syntax highlighting sublime text

I want to know how can I have highlighting syntax for TWIG in Sublime Text. Actually when I open a TWIG file all fonctions and conditions are similar (white on black) :
Antoine Subit
  • 9,803
  • 4
  • 36
  • 52
53
votes
3 answers

How do I get "rainbow parentheses" in emacs?

I would like rainbow parens for editing Clojure in Emacs and since VI does this I assume that in Emacs it should be something like M-x butterfly or something :)
Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284
53
votes
7 answers

Change syntax color in vim?

I have syntax highlighting on, but comments are set to dark blue. This hard for me to read against a black terminal. How do I change it so that the comments are colored green instead?
unholysampler
  • 17,141
  • 7
  • 47
  • 64
52
votes
6 answers

Highlighting the current line number in vim

Is there a way to highlight only the current line number (in the left hand coloumn) in vim, without highlighting the background of the current line? Ideally, I would Like to make the current line number bold.
cg433n
  • 729
  • 1
  • 6
  • 10