How to change the folded part color on Vim
Asked Answered
Z

2

5

I fold some of the functions on my C code. When I fold them, the color becomes gray. Is there any way to change the color of folded part to another color?

Zeniazenith answered 8/7, 2014 at 7:54 Comment(0)
V
9

You can use the :highlight setting. For instance, to set the background to red, add this to your .vimrc:

highlight Folded ctermbg=red

You can view a list of supported colour names by running :source $VIMRUNTIME/syntax/colortest.vim. ctermbg updates the console background; ctermfg updates the console foreground; and guibg & guifg update gvim's background and foreground colours. If you're changing gvim's settings, you can use whatever hex code you like (you don't have to restrict yourself to supported colours).

Votaw answered 8/7, 2014 at 8:3 Comment(0)
A
2

Type :verbose hi it will describe you all the highlighting groups and where they are defined. There is probably one describing the Fold but I don't know the group name by heart.

Advisory answered 8/7, 2014 at 8:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.