[vim/vim] Syntax files should use `setlocal` instead of `set` to not affect new buffers (Issue #19449)

9 views
Skip to first unread message

agguser

unread,
Feb 18, 2026, 9:42:07 AM (7 days ago) Feb 18
to vim/vim, Subscribed
agguser created an issue (vim/vim#19449)

For example, https://github.com/vim/vim/blob/b8b7df29c418b93fa3d8607ae22f10701fa168d6/runtime/syntax/progress.vim#L25 should be setlocal expandtab.


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

Christian Brabandt

unread,
Feb 18, 2026, 9:51:05 AM (7 days ago) Feb 18
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19449)

This should ideally go via the syntax file maintainer please.


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

agguser

unread,
Feb 18, 2026, 9:56:14 AM (7 days ago) Feb 18
to vim/vim, Subscribed
agguser left a comment (vim/vim#19449)

This should ideally go via the syntax file maintainer please.

How? E-mail to the maintainer? Isn't it easier to just change the file in this repo, or someone "assigns" to the maintainer?


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

Christian Brabandt

unread,
Feb 18, 2026, 9:57:31 AM (7 days ago) Feb 18
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19449)

Yes, that is the intended flow: https://github.com/vim/vim/blob/master/CONTRIBUTING.md#syntax-indent-and-other-runtime-files


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

agguser

unread,
Feb 18, 2026, 10:03:37 AM (7 days ago) Feb 18
to vim/vim, Subscribed
agguser left a comment (vim/vim#19449)

Ok. @rdnlsmith Please fix this.


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

Andrew Radev

unread,
Feb 18, 2026, 10:39:31 AM (7 days ago) Feb 18
to vim/vim, Subscribed
AndrewRadev left a comment (vim/vim#19449)

@agguser The expandtab setting is always local to the buffer. You can see this in the help files, next to the setting: :help 'expandtab'. You can also try it yourself. Setting expandtab in one buffer does not set it in other buffers.


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

Daniel Smith

unread,
Feb 18, 2026, 1:01:36 PM (6 days ago) Feb 18
to vim/vim, Subscribed
rdnlsmith left a comment (vim/vim#19449)

Setting expandtab in one buffer does not set it in other buffers.

That's true if the other buffer is already open, but if I run :set expandtab in one buffer and then open a new buffer, the new buffer will have expandtab turned on as well. If I use :setlocal expandtab, then the new buffer has noexpandtab.

I can see how that could be annoying. I think I should have time to send a patch this evening.


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

Andrew Radev

unread,
Feb 18, 2026, 1:16:20 PM (6 days ago) Feb 18
to vim/vim, Subscribed
AndrewRadev left a comment (vim/vim#19449)

That's surprising to me, it looks like "expandtab" is working like a global-local option, but it's documented to be "local to buffer" instead of "global or local to buffer" (e.g. :help 'findfunc')? Or maybe there's some other mechanism I don't know about.


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

Christian Brabandt

unread,
4:53 PM (6 hours ago) 4:53 PM
to vim/vim, Subscribed

Closed #19449 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/19449/issue_event/23048922386@github.com>

Christian Brabandt

unread,
4:53 PM (6 hours ago) 4:53 PM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19449)

fixed as of 342ae5f


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

Reply all
Reply to author
Forward
0 new messages