Questions tagged [syntax-highlighting]

Syntax highlighting is the use of colours, size, typeface, or other attributes to visually indicate it has a special meaning and therefore make it easier to understand the text. For example, marking language keywords with a specific colour.

Filter by
Sorted by
Tagged with
0
votes
1answer
169 views

Vim syntax line matching mechanism

Can someone explain or link to valid explanation information on the syntax highlighting mechanism. In particular I am having having a hard time understanding how rules are applied. Imagine the ...
0
votes
0answers
17 views

Why does second const VARNAME not have syntax highlighting?

I copied and pasted a .php file and edited it. It went from: <?php class Foo { const RESET = 'reset'; to <?php class Foo { const RESET = 'reset'; const ...
0
votes
1answer
412 views

Syntax highlighting (contains, contained) of only the first match

I think it is possible but can not figure how one can highlight only the first match of contained syntax? syn clear syntax cluster TitleParts contains=TitleNum,TitleType,TitleRest syntax match ...
0
votes
1answer
213 views

Matching 'Capitalized' words in Vim

I'm trying to use the following regex to match 'Capitalized' words: "\l\@<!\<\u\w\+" Which matches 'Main' and 'Canvas' in: public class Main extends Canvas Or another example, matches all ...
0
votes
1answer
543 views

Fixing pug syntax highlighting

Update I've managed to get the top part of the file fixed with syn region pugJavascriptLine start=/^\s*-/ end=/$/ contains=@htmlJavascript from this programmer: https://github.com/digitaltoad/vim-pug/...
0
votes
1answer
156 views

Fold: Different highlight style for fold of each filetype

Extend of this question of fold: Fold: foldtext() for each filetype We have fold for each filetype now but each fold need different highlight style of color, because highlight is global I tried to ...
0
votes
1answer
174 views

folding in matlab

I'm using vim for my matlab editor. And It works nicely, except I cannot get folding to work. I found my syntax file on github: matlab.vim And I wanted to add folding. I changed the line syn ...
0
votes
0answers
55 views

Highlight block of injected code [duplicate]

windows 10/ gvim 1-1802. I use Javascript and there are sometimes blocks of HTML code that need to be inside a particular region that can be indicated by """, for example . I have a similar ...
0
votes
0answers
11 views

“set background=dark” masking highlight command [duplicate]

If my .vimrc file has this: set background=dark highlight Comment term=bold ctermfg=white ...comments are white as expected. But if I reverse the order of the statements: highlight Comment term=...
0
votes
1answer
110 views

Finding a match immediately after another match [duplicate]

I'm writing a syntax highlighter for my test script output. I'm having problems figuring out how to find a match immediately after another match. In the screenshot, notice the $VAR1... is not ...
0
votes
0answers
45 views

Turning on syntax highlighting for test script output to new buffer

I'm using a plugin, bexec, to execute a test script. The plugin opens up a new buffer to the right of my code and it displays the output of the test script: I would like to have syntax highlighting ...
-1
votes
1answer
32 views

What's the name of the highlight group for the number column?

The one with the numbers that looks grey ? I already got the fold with this. hi FoldColumn guibg=#000000 guifg=#ffffff I just don't know what the name if that numbers column is.
-1
votes
1answer
53 views

hidden highlight selection when search with * or # is active [duplicate]

Using the * key searches for the word under the cursor. Use # to do the same, backwards. When search is active, all instances of word appears highlighted. I want to know if is possible to remove the ...
-1
votes
1answer
121 views

What is the term of feature used by on-the-fly checkers?

Here are two screenshots, with vim and neovim, both with configured language server protocol and showing same file: Neovim: Vim: I want to configure neovim to have same style as vim -- I do not like ...
-1
votes
1answer
245 views

Adding Additional Syntax Highlight to nvim; cannot get .config/nvim/after/syntax to load .vim file

I'm trying to add additional syntax highlighting to a plugin I'm using for syntax highlighting. I've tried adding the additional syntax file fstrings.vim to the ~/.config/nvim/after/syntax folder but ...
-1
votes
2answers
120 views

annoying red blocks in neovim

im using Neovim from my WSL terminal. I've been exploring the multiple plugins of this amazing open source project and this made me change my init.vim, a lot. Now i've messed it up and i don know how ...
-1
votes
0answers
36 views

How to get a better syntax highlighting on vim? [closed]

Hello Vimmers! I'm new to Vim. How do I get bat's syntax highlighting (or anything similar) on Vim?
-1
votes
0answers
24 views

Please help debug syntax

I want to add syntax and highlighting to markdown filetypes. I have plugin 'vim-markdown-master'. I read that if I want to add syntax and highlighting to syntax files I need to put it in after/syntax/...
-1
votes
1answer
245 views

How to overwrite the conceal background color with line color?

I've started using coc for NeoVim and I've setup a highlight for a line with error using the following: hi CocErrorLine guibg=#ce2c28 However, when the error line has a concealed character, it has a ...

1
8 9 10 11
12