[vim/vim] xdg.vim: 'undodir' and 'viewdir' options should be set to $XDG_STATE_HOME/vim (Issue #19457)

7 views
Skip to first unread message

Andrey Butirsky

unread,
Feb 18, 2026, 6:54:26 PM (4 days ago) Feb 18
to vim/vim, Subscribed
bam80 created an issue (vim/vim#19457)

This is wrong. The standard explicitly tell us "undo" and "view" should go to the STATE:

The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain:

  • actions history (logs, history, recently used files, …)

  • current state of the application that can be reused on a restart (view, layout, open files, undo history, …)

Originally posted by @bam80 in 4f04efb


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

D. Ben Knoble

unread,
Feb 18, 2026, 7:24:58 PM (4 days ago) Feb 18
to vim/vim, Subscribed
benknoble left a comment (vim/vim#19457)

Also here: #19421 (comment)


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

Christian Brabandt

unread,
Feb 19, 2026, 12:21:44 AM (4 days ago) Feb 19
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19457)

I do not agree as mentioned before.


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

Andrey Butirsky

unread,
Feb 19, 2026, 5:57:36 AM (4 days ago) Feb 19
to vim/vim, Subscribed
bam80 left a comment (vim/vim#19457)

if users intentionally create custom view files, those are meant to be reused later. That is a strong argument for keeping them in DATA rather than STATE.

That argument maybe might be applied to the view files, but not to "undo" - those are not meant to be created by user explicitly.
Regarding "reusing later", STATE is perfectly fine with this concept:

The $XDG_STATE_HOME contains state data that should persist between (application) restarts


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

Christian Brabandt

unread,
Feb 19, 2026, 6:22:21 AM (4 days ago) Feb 19
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19457)

That argument maybe might be applied to the view files, but not to "undo" - those are not meant to be created by user explicitly.


Regarding "reusing later", STATE is perfectly fine with this concept:

Of course those are meant to be created by the user explicitly. Why else would he :set undofile?

You like to reference the spec, so here:

The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain:

  • actions history (logs, history, recently used files, …)
  • current state of the application that can be reused on a restart (view, layout, open files, undo history, …)

Yes, those are important and portable enough to be waranted.


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

Christian Brabandt

unread,
1:53 PM (9 hours ago) 1:53 PM
to vim/vim, Subscribed

Closed #19457 as not planned.


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/19457/issue_event/22984467552@github.com>

Reply all
Reply to author
Forward
0 new messages