New answers tagged

2 votes

How do you highlight text surrounded by double equals

I had the same question. My solution is not perfect, since I do not do exactly what you want, but you can adapt my solution to yours, if you are willing to add more highlight groups. To do close what ...
user avatar
  • 121
1 vote

Syntax highlight for C #define constant

Strictly technically speaking, there isn't really a difference between a define that "acts like a constant" vs. a "macro": in both cases the C pre-processor essentially does a ...
user avatar
2 votes
Accepted

Create a new syntax highlighting by reusing an existing syntax

The user manual explains how to do this at :help 44.9. In your new cext.vim syntax highlighting file, add the following line to include the Vim runtime's existing C++ highlighting: :runtime! syntax/...
user avatar
  • 28.2k
1 vote

Syntax highlighting for grub configuration

If filetype was set wrong then reset it manually. If it happens too often then fix it by :h ftdetect once and forever; If syntax is outdated ping syntax maintainer. If syntax is abandoned search web ...
user avatar
  • 16.9k
0 votes

Is it possible to specify a background color that is "added" in a particular matching region?

The resulting highlight for each position in text is set according to the most deeply nested syntax match at that position. If such match lacks, say, background attribute then it's taken from Normal ...
user avatar
  • 16.9k
0 votes

Vimwiki/Markdown blockquote syntax highlight

You can modify the behavior of syntax files. Create a file at .vim/syntax/after/markdown.vim with the contents: "highlight the entire block quote syn match Statement "^> .*" Note '...
user avatar
2 votes
Accepted

How to recognize Azure pipeline template expressions in bash?

This fixes it: ~/.vim/after/syntax/yaml/SyntaxInclude.vim: call SyntaxRange#Include('^\ *- \(script\|bash\): |', 'condition\|displayName', 'bash') " Allow template variables ... " ... in ...
user avatar
  • 173
3 votes
Accepted

How can I enable .xml syntax highlighting for .xaml files?

Assuming all works as you wish it when you enter :set filetype=xml when your XAML file is open in a buffer, try this: create file ~/.vim/ftdetect/xaml.vim containing the following: " Detects XAML ...
user avatar
  • 223
1 vote

syntax highlighting breaks on escaped newlines / characters

This code uses the i3ConfigLineCont rule. syn region i3ConfigLineCont start=/^.*\\$/ end=/^.*$/ ... end=/^.*$/ needs to be end=/^[^\\]*$/ to fix the highlight error. There is a pull request with this ...
user avatar

Top 50 recent answers are included