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
2
votes
3 answers

Javascript language constructs

I'm writing a Javascript syntax highlighter and I am not 100% I have everything. So far I have: Comments (// and /* */) Regex Number Highlighting Quotes (" and ') I also have keyword…
user372743
2
votes
2 answers

PHP HTML \t and Tab Troubles

I have started making a syntax highlighter in php (only a quick one) and so far I have got a code box generator (aka it creates a table with styles that looks good and can display source code and html code). At the moment when writing code with it I…
Ell
  • 4,238
  • 6
  • 34
  • 60
2
votes
0 answers

Xcode how to fix "ghost lines" in text editor when embedding emoji in strings?

I'm working on a 13" MacBook air with Xcode 7 and am running into an issue with ghost lines being displayed when using emoji in string literals. If I include emoji into a string and hit enter, it is likely that Xcode will get confused about true…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
2
votes
0 answers

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, double, char, etc. More specifically I guess…
niko
  • 1,128
  • 1
  • 11
  • 25
2
votes
4 answers

How can I change my Vim vimrc to know when I am typing a PHP variable and match the color?

When using Vim the way my color syntax is now, when I type in $ it shows yellow and when I write text it comes in white. How can I configure my vimrc to know when I am writing a PHP variable ($variable) and keep the color consistent between the $…
Drewdin
  • 1,732
  • 5
  • 23
  • 35
2
votes
1 answer

tmLanguage syntax highlighting with begin-end rules without highlighting a begin that doesn't have an end

I am creating a simple postfix programming language. The syntax is as follows: 2 3 add adds the two integers 2 and 3 together. "hello, world!" puts puts the string "hello, world!" to STDOUT. The defining of new functions that can be used, is done as…
Qqwy
  • 5,214
  • 5
  • 42
  • 83
2
votes
1 answer

Embedding code in presentations?

Not sure if this fits this forum, but can anyone recommend a good tool to embed code (with syntax highlighting) in presentations / office documents? Taking a screenshot is less than ideal. I'm using OpenOffice. Thanks.
sa125
  • 28,121
  • 38
  • 111
  • 153
2
votes
1 answer

knitr syntax highlighting in .Rnw files (LaTeX)

I am using .Rnw files to produce a report with LaTeX and knitr. My knitr_setup looks as follows: <>= library(knitr) opts_chunk$set(highlight = TRUE, cache = TRUE, eval = FALSE, size = "small") options(width =…
pat-s
  • 5,992
  • 1
  • 32
  • 60
2
votes
2 answers

Sublime Text 3 Syntax Coloration Issues PHP/HTML

This is my first post on stackoverflow, and I'm glad to be here. So I have a syntax coloration issue with Sublime Text 3 in a single file .ctp (Cakephp Template). I use Php and Html in this same file. The coloration doesn't seems to work in the…
2
votes
2 answers

scala in IntelliJ Idea: display differently immutable (val) vs mutable (var) variables?

Is it possible to set syntax highlighting in IntelliJ Idea for scala code, so that mutable variables declared with var displays in different color (and/or style) than immutable variables (declared with val or function parameters)? Eclipse has this…
Stepan
  • 1,430
  • 2
  • 14
  • 11
2
votes
0 answers

Android Development: How Can I Add Syntax Highlighting Features

I want to add syntax highlighting to my application. I'll be using syntax highlighting with PHP, HTML, CSS, XML and JavaScript. How can I do this? I have a TextChanger set up on my EditText, which I want to use so that the syntax highlighting…
AlexPriceAP
  • 1,987
  • 6
  • 26
  • 41
2
votes
1 answer

Visual Studio 2015 highlighting / intellisense stops working after dependency rebuilt

While working on two Visual Studio solutions, one of which depends on the other, if I build the dependency the other 'master' project seems to lose track of the dependency, but only as far as intellisense and syntax highlighting. So the master…
Derf Skren
  • 479
  • 2
  • 22
2
votes
2 answers

New and Delete Operator?

What i'm asking now is, what does the delete and new operator do in C? I asked this question, when I was just simply thinking about how to allocate memory in C++, and I remembered you use the new and delete keyword, (malloc() and free() in C). But…
amanuel2
  • 4,508
  • 4
  • 36
  • 67
2
votes
2 answers

Change syntax highlight colors in MySQLWorkbench

Does anyone know of a way to change the syntax highlight colors in MySQLWorkbench on OSX? The gray color for comments is really hard for me to read. I did see this solution, but I suspect this is for Windows and I don't see that file anywhere in…
Dave
  • 3,273
  • 1
  • 17
  • 15
2
votes
2 answers

Coqide 8.5: No syntax highlighting on Linux

I installed Coqide 8.5 w/ nix. Unfortunately, the text is blakc in all panels; there's no syntax highlighting of any kind (otherwise, 8.5 seems a big improvement over 8.4, which I've installed as well). I also get the following: (coqide:17272):…
jaam
  • 900
  • 4
  • 23
1 2 3
99
100