392 questions
2
votes
0
answers
62
views
Vim syntax highlighting region is not correctly highlighted
I want to highlight special regions in a special extension .html.specialext, the regions are Lua code in some delimiter, here it's {{ and }}.
Detecting custom filetypes is trivial but here is my code ...
1
vote
1
answer
99
views
How to define syntax highlighting for both multi-line and single line strings inside of vim syntax file
I have a programming language that supports multi-line strings, the syntax is as follows (EBNF):
longstring ::= '"""' {'"'} newline chars newline '"""' {'"'}
...
1
vote
1
answer
94
views
How do I change vim's syntax highlighting for multiline comment in *.py files?
How do I change syntax color of multiline comment in python source codes?
Line
hi def link pythonComment Comment
in /usr/share/vim/vim82/syntax/python.vim seems to cover only singleline ...
1
vote
1
answer
204
views
How do I fix the current line color using solarized vim dark mode using Termdebug?
I'm using solarized with vim and when I'm debugging (using Termdebug), the current execution line is missing:
I've been working around the issue by switching to light mode:
If I go back to dark, ...
0
votes
0
answers
159
views
Why is my region in my Neovim Syntax file unresponsive?
First of all I'm using Neovim(v0.8.1) so I don't know if it also applies to Vim.
I'm creating a syntax file with the following region :
syn region TestRegion start='^RegionStart\n^NextLineStart' end='^...
0
votes
2
answers
113
views
Can I cascade vim syntax highlighting rules like in nano?
I have a custom file type, which contains lots of fields like
FieldName: FieldValue
I'm trying to create syntax highlighting for this filetype, in nano and vim, such that "Fieldname" ...
0
votes
2
answers
754
views
My conceal options are not loading in vim
I have some conceal options (syntax match Normal '\.md\]' conceal cchar=]) added in a $HOME/.vim/after/syntax/base.vim.
They are not loaded when I open a file. But if i do :source $HOME/.vim/after/...
2
votes
2
answers
1k
views
vim syntax highlighting: region that starts with "#" and end with either "#" or end of line
The situation
I am in the process of writing a vim syntax file for a language that allows inline comments following this scheme:
This is code # and here is comment # but this is code again
The ...
0
votes
0
answers
265
views
Semantic hilight function names in vim
I have a file with some subroutines.
The syntax is like
subroutine sub_name_1
...
endsub
/* or optionally */
subroutine sub_name_2 {
...
}
There are called like call sub_name_1.
I can't ...
-3
votes
1
answer
416
views
create syntax checker vim plugin for a new Programming language [closed]
I want to create a new vim syntax checker for a new programming language that is not used widely, first i tried to read the code of the follwing plugins neomake, syntastic
, and Ale in order to ...
-1
votes
1
answer
416
views
VIM filetypes - why do some file type matchers use "call" and others "setf"?
Suppose I've written a new syntax file for vim, for some file type, and I now want to integrate it into vim (8.1). I'm looking at /usr/share/vim/vim81/filetypes.vim, and I'm noticing some lines have ...
1
vote
1
answer
314
views
Vim highlight a set of words in different colors each in all files
I need vim/Gvim to highlight a set of keywords each with mentioned color in all files (it may be a text file, c source file, or anything else).
For example TODO, FIXME are highlighted in C files. Like ...
4
votes
0
answers
310
views
Vim - proper handling of multiple syntax in a single shell script
I write many scripts where there is complex awk logic incorporated into the script directly. I prefer the "one-stop-shop" approach and not have those logic segments as external files.
I ...
-1
votes
1
answer
2k
views
gvim Systemverilog syntax matching :is there way to match `ifdef `ifndef `else and `endif
I have used standard SystemVerilog syntax packages but not able to match(with % move the cursor between) these strings. This is in the context of matchit function in Vim(https://www.vim.org/scripts/...
0
votes
3
answers
1k
views
Should I avoid using "str" as a variable name in Python?
I've noticed that certain variable names in Python get flagged up by Vim in blue highlight, whereas others do not. I'm familiar with the concept of reserved words, per this question, but from looking ...
2
votes
1
answer
427
views
Keeping syntax color foreground in vim search highlight
In Vim, is it possible to get the foreground text in a highlighted search match to keep the colors specified by my colorscheme?
If possible, I'd like to customize just the background color of the ...
2
votes
1
answer
260
views
Vim syntax highlighting: Bisect code inside parentheses and target each side
Vim scripting newbie here, trying to write a syntax file for an ML-like language.
What I'm trying to do is apply type syntax highlighting rules to type annotations that exist to the right of a colon ...
1
vote
2
answers
2k
views
Color highlight function calls in VIM
Does anyone know a way to color highlight function calls in Vim?
I know that some plugins could do something like that by keeping record of tags, but with what I've found online, I could not figure ...
0
votes
3
answers
249
views
Is it possible to match string at the beginning of line, but only capture the end with regex?
I have text that is something like this:
[G&]120948103471390857102349871[002]
[A&]512903451029349012390409232[002]
[2&]512903451029349012390409232[002]
I would like to match only the [002]...
0
votes
1
answer
321
views
Create map for commenting line(s) of code in Vimrc
I want to create a map for commenting one or multiple lines of code in Vim, to easily be able to temporarily comment things. For now, I've done the following, which simply inserts // in front of all ...
1
vote
0
answers
55
views
vim-highlight: cannot match regular expression lookbehind [duplicate]
I'm trying to use the vim-syntax to configure some custom highlight for my c++ project.
I've created a file named cpp.vim and put it into ~/.vim/syntax/. And to highlight the function name, I put
...
2
votes
1
answer
1k
views
How to change a specific line number color in Vim
I've been wanted to do this for a while, sometimes when I have a file open I want to be able to highlight certain line numbers to a different color. For example, say my LineNr is blue, and my Current ...
1
vote
1
answer
566
views
vim syntax - How to highlight a match inside a region
I'm writing a vim syntax highlighting script to determine if a global param is in uppercase only. If its not - I want to highlight it.
The problem is that the global params is in a specific part in ...
0
votes
0
answers
644
views
Messed up my vim colorscheme and can't get it back
So I had this beautifully themed Vim colorscheme which used the terminal colors (24bit true color Termite with dark solarized color theme), the visual mode simply reverted the colors in selected text, ...
10
votes
6
answers
6k
views
Why does Vim highlight all my JSON comments in red?
I've got some comments in a JSON file that were autogenerated by, and unfortunately it seems like vim can't recognize that they're just comments.
They're all red - which one of my plugins is doing ...