New answers tagged

1

There's no way to do this directly with highlight! since links and groups are fundamentally different. You can have a highlight that is a link or a highlight with properties, you can't have both. Instead you can try to use hlget and hlset as follows: let resolve = v:true " set to v:false if not wanting to resolve links let hl = hlget('CocSemVariable'...


2

| separates atoms and dot makes vim unhappy about it so you could add additional braces syntax match FOO /\v(\.foo1>)|(\.foo2>)|(\.foo3>)/ or put a dot out of the branching: syntax match FOO /\v\.<(foo1|foo2|foo3)>/ hi link FOO Statement


2

This works like a charm to change colors The red flash: ERROR. The syntax is local to buffer (or even to window :h ownsyntax). But the colors are global. So syntax files should do "hi-def-link" at most. Other stuff belongs to colorschemes. the settings work also inside the document Going through the text the matches are tried with respect to the ...


0

"Addons" is just another directory that could be added to :h 'runtimepath' by :h system-vimrc. It is intended for package manager (sudo apt install vim-foobar goes here). For this reason, you're not adviced to do anything with it. Except for this, your question is unclear to me, as the code is simply broken. If what you're trying is to extend C++ ...


0

For me, the problem was that my .conf file was in a file path that vim's filetype.vim did not expect. I was able to get automatic syntax highlighting to work in vim 80 by editing the filetype.vim file in the following way. sudo vi /usr/share/vim/vim80/filetype.vim Find a line that ends with setf apache. " Apache config file au BufNewFile,BufRead ....


0

Vim doesn't have anything related to .upf file extension out of the box. No syntax files, no filetypes. You can check it by navigating to :e $VIMRUNTIME/syntax or/and by checking filetype detection rules in :e $VIMRUNTIME/filetype.vim. So the question is how in the first place you have ## highlighted in .upf file generated by some program. Did you install ...


Top 50 recent answers are included