[vim/vim] Add log syntax file (Issue #18218)

18 views
Skip to first unread message

毛逸宁

unread,
Sep 6, 2025, 4:51:47 AMSep 6
to vim/vim, Subscribed
mao-yining created an issue (vim/vim#18218)

The messages syntax file is narrow. I hope there is a log syntax file to enhance vim's log view.

As https://github.com/MTDL9/vim-log-highlighting

Thanks!


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18218@github.com>

Christian Brabandt

unread,
Sep 6, 2025, 8:32:08 AMSep 6
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18218)

The way to add new runtime files is to ask the author to submit their work here. This way we get explicit permissions to distribute their work and they acknowledge to be upstream maintainer in case of bugs.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18218/3262063219@github.com>

毛逸宁

unread,
Sep 6, 2025, 11:30:37 AMSep 6
to vim/vim, Subscribed

Closed #18218 as completed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/18218/issue_event/19544410977@github.com>

毛逸宁

unread,
Sep 12, 2025, 9:21:36 AMSep 12
to vim/vim, Subscribed
mao-yining left a comment (vim/vim#18218)

It seems that the original author had a long time not active on github. Can I submit his work and responsible for maintain it?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18218/3285280118@github.com>

毛逸宁

unread,
Sep 12, 2025, 10:49:53 AMSep 12
to vim/vim, Subscribed

Reopened #18218.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/18218/issue_event/19662847395@github.com>

毛逸宁

unread,
Sep 12, 2025, 10:49:55 AMSep 12
to vim/vim, Subscribed
mao-yining left a comment (vim/vim#18218)

It seems that the original author had a long time not active on github. Can I submit his work and responsible for maintain it?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18218/3285592308@github.com>

Christian Brabandt

unread,
Sep 12, 2025, 11:01:41 AMSep 12
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18218)

It should be okay since his work is distributed under the MIT license. If you are willing to maintain it, best would be to fork the upstream repo, and submit it under your user and then you can also add yourself in the header of the runtime scripts (and point to your repo for questions, issues and improvements). Thanks.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18218/3285630231@github.com>

chdiza

unread,
Sep 14, 2025, 8:21:27 AMSep 14
to vim/vim, Subscribed
chdiza left a comment (vim/vim#18218)

It's not clear to me that there really is such a thing a a "generic log", and thus it is unclear that we want to have Vim automatically treat things with a ".log" suffix as having a specific syntax file activated.

E.g., tex and latex produce files ending in ".log", but it makes no sense for them to be highlighted with the syntax from 9.1.1755.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18218/3289498095@github.com>

dkearns

unread,
Sep 14, 2025, 8:44:56 AMSep 14
to vim/vim, Subscribed
dkearns left a comment (vim/vim#18218)

I think the filetype detection needs to do some work to check that it's an appropriately formatted log file.

The first hundred log files that locate turns up on my system are JSON, for example.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18218/3289516182@github.com>

Christian Brabandt

unread,
Sep 14, 2025, 11:11:11 AMSep 14
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18218)

I have been using the above mentioned MTDL9 repo for JSON log files at my work and it helps reading those files. Log is a bit generic in that there could be different syntaxes being used, so it is hard to get it right. I was hoping that this generic format is still being useful by highlighting dates and errors.

But I am fine with further tuning the log file detection logic.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18218/3289620357@github.com>

Shane-XB-Qian

unread,
Sep 14, 2025, 11:48:48 AMSep 14
to vim/vim, Subscribed
Shane-XB-Qian left a comment (vim/vim#18218)
for example auto/config.log
i donot think such 'generic' highlight of so called 'log' ft, helped something meaningful:
- vs lots of confusion
- vs slow down perf lot


> But I am fine with further tuning the log file detection logic.

:shrug: supposed we cannot always reply on 'future', at least for now, sry, but the highlight for now it is ugly.

--
shane.xb.qian


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18218/3289643159@github.com>

chdiza

unread,
Sep 14, 2025, 12:13:44 PMSep 14
to vim/vim, Subscribed
chdiza left a comment (vim/vim#18218)

I was hoping that this generic format is still being useful by highlighting dates and errors.

The problem is that it also highlights a bunch of other stuff (e.g., seemingly every single space-flanked number (!!), backslash, or asterisk), which is profoundly distracting for some other legit files that have the suffix "log".

I'm going to carry au BufNewFile,BufRead *.log setf ignored around.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18218/3289659952@github.com>

Shane-XB-Qian

unread,
Sep 14, 2025, 12:37:44 PMSep 14
to vim/vim, Subscribed
Shane-XB-Qian left a comment (vim/vim#18218)
> The problem is that it *also* highlights a bunch of other stuff (e.g., seemingly every single space-flanked number (!!), backslash, or asterisk), which is profoundly distracting for some other legit files that have the suffix "log".

Even it was that "legit" log, the perf impacted too much, i donot think it was worthy.


> I'm going to carry `au BufNewFile,BufRead *.log setf ignored` around.

I may simply syn clear

--
shane.xb.qian


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18218/3289674735@github.com>

Christian Brabandt

unread,
Sep 14, 2025, 2:11:53 PMSep 14
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#18218)

Alright, I'll revert it. I keep the logfile syntax however


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/18218/3289743651@github.com>

毛逸宁

unread,
5:12 AM (10 hours ago) 5:12 AM
to vim/vim, Subscribed

Closed #18218 as completed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/18218/issue_event/20003683474@github.com>

Reply all
Reply to author
Forward
0 new messages