How do I highlight the beginning of the block in vim?

0

My current vim config (YADR) shows the beginning bracket highlighted (only) when I am on the ending one and vice versa. Is there a way to get the same functionality for block beginning and endings, like when I am on the if, highlight else and end, if I am on a function do highlight the end (i.e. in ruby).

The information for what is the beginning and the end of a block should already exist for syntax highlighting or folding, shouldn't it? Is there a way to enable this generally for all languages that are "supported" (I don't know what would qualify as this. ctags? syntax highlighting scheme? Sorry I am not that familiar with the internals of vim yet)

mmlac

Posted 2013-12-03T18:41:53.297

Reputation: 276

Answers

0

You're probably referring to the default matchparen plugin, which highlights ( and the corresponding ); see :help matchparen.

There is no general solution for other (larger) pairs (such as begin .. end). However, there exist some special solutions for particular filetypes, e.g. MatchTag for opening / closeing HTML tags.

Ingo Karkat

Posted 2013-12-03T18:41:53.297

Reputation: 19 513