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.

0
votes
1answer
44 views

How to avoid syntax-highlight issue with backtick escape sequences inside a template literal?

Notepad++ has an issue where it breaks the syntax-highlighting when using a backtick escape sequence inside a template literal. It doesn't happen when escaping a single quote in a single quote string ...
1
vote
0answers
21 views

How do I hide empyy lines in a Python file in Vim?

I have some empty lines showing as dark purple lines in my color theme in vim(Gvim). I would like to hide them for real. I use "set list" but that just replaces with some other characters. I just ...
0
votes
0answers
6 views

Auto highlight a custom syntax in cmd [duplicate]

I am trying highlight a syntax in cmd automatically when typing. Like in: C:\Users\User>echo "Hello" "Hello" C:\Users\User> In above command (echo "Hello") , I would like to change the color ...
0
votes
0answers
43 views

Syntax highlighting for PowerShell on Linux?

With PowerShell on Linux (pwsh), is there a way to get syntax highlighting on the console in the same way that it works by default in the Windows console?
0
votes
1answer
53 views

How to remove a limit of 100kB when highlighting a file with custom syntax?

I have created a custom syntax file for Smalltalk/X - smalltalk embedded with C. The highlighting file is mostly correct (still needs some love, but that is out of the scope of this question). I ...
0
votes
0answers
19 views

IntelliJ: How to turn off highlights of class, method names

How can I turn off the highlights on import statements class names method names (signature and calls) things such as @Test ?
0
votes
2answers
125 views

Notepad++ with “sub levels” [duplicate]

I am writing HTML in Notepad++, but I did not find a way of making it more organized. I want, for example, that "head" is more to the right than "html". Example: Notepad++ is like: And i want it to ...
2
votes
1answer
312 views

Syntax Highlighting Color of HereDoc in Shell Language

I need some help modifying the default syntax colors. I've already spent too much time trying to research how to change the following shell script default, please help me... ;-( Here's the way I don'...
0
votes
0answers
30 views

Atom.io | How to edit CSON file

I am trying to edit my language-php/grammars/php.cson file in order to resolve an issue with syntax highlighting. However, I cannot seem to find this on my Windows installation of Atom.io ... It is ...
0
votes
0answers
70 views

How do I get Atom.io to properly color SQL when inside a PHP string?

Am I missing some package to correct this? At times, it works correctly ... Sometimes it does not work correctly ..
0
votes
1answer
258 views

Babel syntax highlighting for React not working?

I've installed the Babel package in Sublime Text 3 (I see it in Preferences -> Package Settings), but the syntax highlighting for a sample App.js still looks weird: For example, I would expect the ...
0
votes
0answers
15 views

Change style for extensions that already have a style in Notepad++ [duplicate]

I've already tried the answers from here and here and neither fixed my problem. In Notepad++ using the Obsidian theme, the syntax highlighting for JSON files disappears; everything is white on black. ...
0
votes
0answers
85 views

Visual Studio - refresh syntax highlighting

I'm using Visual Studio to develop Python applications. Everything works well, but syntax highlighting sometimes just goes wrong. For example: classes. < purple, including dot which should be ...
0
votes
1answer
130 views

SublimeText highlighting for plain text

Sublime has highlighting plugins for almost any language, however often i use raw text format to write down some ongoing notes. When the content gets big enough it is useful to have some ...
1
vote
1answer
218 views

vim not picking up new syntax files

I copied this GLSL syntax file to /usr/share/vim/vim74/syntax/glsl.vim, its permissions are -rw-r--r-- same as other syntax files. I gvim /tmp/x.glsl but it does not activate GLSL syntax highlighting ...
2
votes
1answer
499 views

How to edit/change/modify the Syntax Highlighting Color in VS Code

How to edit/change/modify the Syntax Highlighting Color in VS Code, ie for Autohotkey and/or Markdown languages? For example: Im using the High Contrast theme (black background), and in that theme, ...
1
vote
1answer
38 views

How can I change certain keywords in vim to all-caps?

How can I change certain keywords in vim to all-caps? I would like to know as I am programming in Fortran and the required style is to have all the intrinsic functions in caps. For example the keyword ...
1
vote
1answer
201 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 ...
4
votes
1answer
91 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 ...
1
vote
0answers
602 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
0answers
128 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
1answer
476 views

Sublime match if endif block

Is there a way in sublimetext3 (by any plugins) to jump from start of an if block to corresponding endif? Using fortran code. Any other action besides jumping would work as well, like highlight or ...
0
votes
0answers
60 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 ...
1
vote
1answer
59 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....
1
vote
1answer
690 views

Detect language of new files in vim (refresh syntax highlighting)

Whenever you open a file, vim performs a series of checks to determine the language of the file and applies the relevant syntax highlighting; first by checking the file extension, then by looking ...
1
vote
1answer
2k views

How to enhance Notepad++ to support Laravel blade syntax highlighting in a PHP file?

After looking online I cannot find any info on enhancing N++ to support syntax highlighting for Laravel's Blade syntax (*.blade.php). Example: demo.blade.php <html> <head> &...
0
votes
1answer
328 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 ...
4
votes
1answer
1k 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 ...
9
votes
1answer
827 views

vim syntax highlight limited to 3000 chars

How do I allow vim to work its syntax highlight on lines longer than 3000 characters? I am having to write tests for a system and the input for the tests are a mess of encapsulated formats. My tests ...
1
vote
1answer
156 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 ...
4
votes
1answer
2k views

How to get Sublime Text 3 to automatically highlight CSHTML as HTML

I have a bunch of .CSHTML files that I want to be highlighted. Every time I open a .CSHTML file I have to go to the bottom right of the sublime text window and manually tell it to treat the CSHTML as ...
1
vote
0answers
112 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 ...
1
vote
1answer
23 views

In-document highlighting hint for Kate

Is it possible to provide a hint for Kate which highlighting to use for a given document (inside the document itself) so that I don't have to set it manually? If so, in which syntax?
1
vote
1answer
434 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
0answers
729 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
1answer
318 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 ...
1
vote
3answers
111 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 ...
0
votes
1answer
260 views

Visual Basic highlighting for Kate text editor

kate supports syntax highlighting for so many programming languages I was surprised when I couldn't find Visual Basic on the list. How can I get Visual Basic highlighting on kate? I know some ...
0
votes
1answer
357 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
votes
1answer
435 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
0answers
290 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
0answers
199 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,...
2
votes
0answers
283 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 ...
0
votes
0answers
254 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 ...
3
votes
1answer
1k views

Turn off syntax highlighting in Markdown code blocks (highlight.js underneath)

I am doing a presentation using Marp. It automatically adds syntax coloring to blocks of code. For example this would be colored as Ruby: ``` def fun(x): x+1 end ``` I can force highlight.js to ...
2
votes
1answer
839 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.
1
vote
0answers
78 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()...
0
votes
0answers
456 views

Inconsistent Notepad++ syntax highlighting in Bash/Shell

What I want is (controlled by SCALAR and PARAM styles): However, with quotes ("), everything becomes (controlled by STRING style): How do I make the 2 undermost lines get the highlighting, as per ...
2
votes
1answer
1k 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 ...
0
votes
1answer
243 views

Inno Setup script (.iss) syntax highlight in Sublime Text?

I'm working on the Inno Setup based installer. I'd prefer to edit the script file in Sublime Text, but it doesn't appear to detect the language and doesn't enable syntax highlighting. I have failed so ...