Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to find out where a vim highlighting is defined?

I'm trying to change the highlighting in vim for the highlighting group "Folded". I'm using the color scheme "koehler" and my folded lines appear in cyan on a grey background in gvim, which is completely unreadable. I thought I could edit the :highlight command responsible for this group in the koehler.vim color scheme file but there is no definition for "Folded" in that file.

I verified that I have color scheme koehler loaded:

:echo g:colors_name
koehler

Then I listed all the highlighting groups with a command I found in another post:

:so $VIMRUNTIME/syntax/hitest.vim   

Highlighting groups for various occasions
-----------------------------------------
[...]
Folded  Folded
FoldColumn  FoldColumn
[...]

The "Folded" group is shown in the ugly colors I also see in my files. The file I was editing was a "viki" file but I get exactly the same with a perl script, so the highlighting for "Folded" must be defined somewhere central. I don't have any :hilight commands in my .vimrc.

How can I find out where this group is defined?

like image 516
tospo Avatar asked Nov 22 '10 11:11

tospo


People also ask

How do I remove highlights in Vim?

By default, Ctrl L in Vim clears and redraws the screen. A number of command line programs (mostly those using the GNU Readline library, such as Bash) use the same key combination to clear the screen.

Why are some words highlighted in Vim?

Most filetypes (like python) in Vim come with a syntax that defines highlight groups (see them via :highlight ). A colorscheme then provides combinations of foreground / background color and/or formatting like bold and italic, for terminals, color terminals, and/or GVIM.


1 Answers

Using

:verbose hi Folded

You should be able to display where the Folded attribute was last modified. (Usually the answer is the active colorscheme file)

like image 82
Xavier T. Avatar answered Nov 04 '22 10:11

Xavier T.