aligrudi / neatvi

A small vi/ex editor for editing UTF-8 text
http://litcave.rudi.ir/
305 stars 25 forks source link

C Multi line comment doesn't get highlighted #65

Closed batalooppak closed 8 months ago

batalooppak commented 10 months ago

In MacOS with neatvi latest pull.

In C file:

Screen Shot 2023-10-24 at 01 12 05
aligrudi commented 10 months ago

Lucas @.***> wrote:

In MacOS with neatvi latest pull.

In C file:

Screen Shot 2023-10-24 at 01 12 05

Neatvi's syntax highlighting processes individual lines and cannot highlight multi-line patterns. Nevertheless, you can add the following pattern to highlights array in conf.h to highlight kernel-style C-comments:

{"c", {2 | SYN_IT}, "^\t*(/\\*.*| \\*.*| \\*\\//)$"},

It highlights comments similar to this:

/* abc
 * def
 */

Ali
aligrudi commented 9 months ago

I updated conf.h to include this pattern.

Ali
lobre commented 9 months ago

I validate that it works. To me, this ticket can be closed.

batalooppak commented 8 months ago

I also validate. Thanks!