[vim/vim] Opening help file for editing will lose syntax highlith also in the help buffer (Issue #19968)

7 views
Skip to first unread message

antoniopaolini

unread,
Apr 13, 2026, 9:29:11 AMApr 13
to vim/vim, Subscribed
antoniopaolini created an issue (vim/vim#19968)

Steps to reproduce

I have a plugin I wrote myself, installed via Pathogen in the ‘bundle’ folder.
When I start editing the help file, I see it as a text file, which is as it should be.
But if I open the help in a split window and go to open this help item, I see that the syntax is set to text for both windows.
If I go back to the help index or in another help item the syntax is correcttly set on "help".
See attached screencast.

https://github.com/user-attachments/assets/6da90a92-5465-4153-b896-fa0f3d206792

Addendum: If I open another buffer with :enew and then go to my help item, if I go back at the previous buffer (:1b) the syntax is help for both windows.

Expected behaviour

I expected that in the editing window the syntax was text and in the help window the syntax was help.

Version of Vim

9.2.173

Environment

OS: Windows 11

Logs and stack traces


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/19968@github.com>

antoniopaolini

unread,
Apr 14, 2026, 6:47:43 AMApr 14
to vim/vim, Subscribed
antoniopaolini left a comment (vim/vim#19968)

UPDATE: I even tried to open a different file with same name (I made a copy in another location) and then the help file.. In this case the different files have different syntax enabled.


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

Christian Brabandt

unread,
Apr 14, 2026, 8:56:47 AMApr 14
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19968)

do you by any chance use ft=help in a modeline in your custom file?


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

antoniopaolini

unread,
Apr 15, 2026, 2:11:48 PMApr 15
to vim/vim, Subscribed
antoniopaolini left a comment (vim/vim#19968)

do you by any chance use ft=help in a modeline in your custom file?

No, there's no modeline in my file. If it could help I can attach my file.
I think that issue is related to opening same file in the same buffer, but in my opinion it should be possible because first I open the file in order to edit (and I want to see it as text file) but if I open in another windows the help and I go to this file/item i want to see it as help.

I did another try. As in the first procedure I open the file and it is seen as a text file. Then I open the help and whet I go in the item the syntax in the help window became "text", exactly as in my first message.
But if I do :set ft=help instead of the :set syn=help I see that both file syntax became help and both filetype became help but only in the help window the file will be reformatted as a real help file (I see, for example in row 15 and 16, that the "`" character disappear and my vertical row became aligned).

cheatsheet-AP.txt

Tell me if it would be useful another screencast.


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

Reply all
Reply to author
Forward
0 new messages