aligrudi / neatvi

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

C Multi line comment doesn't get highlighted #65

Closed batalooppak closed 10 months ago

batalooppak commented 1 year ago

In MacOS with neatvi latest pull.

In C file:

Screen Shot 2023-10-24 at 01 12 05
aligrudi commented 1 year 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 11 months ago

I updated conf.h to include this pattern.

Ali
lobre commented 11 months ago

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

batalooppak commented 10 months ago

I also validate. Thanks!