Highlight multiple lines between two search patterns in gvim

I am trying to highlight several lines that correspond to two words that are present on two different lines.

1.Todo : used for todo comments (those that have "TODO: something in them )

2.Comment: indicates a comment on the code.
3.Statement: a code statement similar to a for loop. 4.Type: custom type, typically 5.PreProc: a preprocessor statement like #include < stdio .h>

To highlight between todo and something on the same line, we use /todo.*something

but to highlight between todo and stdio (which is present on the 5th line) there is some kind of command.

Thank.

+4
source share
1 answer

you can use \_.to include strings. In the example todo ... stdioyou can try:

/todo\_.\{-}stdio
+4
source

Source: https://habr.com/ru/post/1682841/


All Articles