[vim/vim] [RFC] Support all XDG Basedirs (Issue #19399)

5 views
Skip to first unread message

Andrey Butirsky

unread,
Feb 13, 2026, 5:24:52 PM (yesterday) Feb 13
to vim/vim, Subscribed
bam80 created an issue (vim/vim#19399)

https://github.com/vim/vim/blob/48cee53615069e3a5a04be265440180e29f9997a/runtime/doc/starting.txt#L1121-L1129

So we have $XDG_CONFIG_HOME already and this is awesome.

Let's discuss here or in the https://github.com/vim/vim/discussions how to support the other XDG Dirs.

@saccarosium


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

Christian Brabandt

unread,
4:06 AM (14 hours ago) 4:06 AM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19399)

I mentioned it before: I don't like the idea of spreading out the various vim state files accross several different directory trees. That makes backing up just a mess. If you want this, you can however already configure this from your .vimrc.


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

Andrey Butirsky

unread,
6:14 AM (12 hours ago) 6:14 AM
to vim/vim, Subscribed
bam80 left a comment (vim/vim#19399)

If you don't like the idea behind XDG standrad, that's not the reason we shouldn't support it probably, because others like it. The two approaches could happily so-exist, though.

If you want this, you can however already configure this from your .vimrc.

How exactly? At the very least, we need documented (in the Vim doc itself) solution, not just a possibility to do 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/19399/3901709843@github.com>

Luca Saccarola

unread,
8:22 AM (10 hours ago) 8:22 AM
to vim/vim, Subscribed
saccarosium left a comment (vim/vim#19399)

In the current state of the implementation, if things didn't change from my last PR, some files are still placed in the home folder (e.g. .viminfo). While I've grown to dislike the full XDG_DIR approach myself, I still think that having at least two directories to say: here goes the config stuff and here goes the data/cache/temporary when using the .config/vim location would be a good idea. Maybe you can use XDG_CACHE_DIR for that or dump everything into the config (but someone already argue against that in the original PR).

Also I'll note that it is a good idea to maybe also support the appropriate folder on windows in AppData\Roaming.


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

Andrey Butirsky

unread,
8:57 AM (9 hours ago) 8:57 AM
to vim/vim, Subscribed
bam80 left a comment (vim/vim#19399)

Here is approach of full XDG support via vimrc, before $XDG_CONFIG_HOME support era:
https://jorenar.com/blog/vim-xdg

If it suits most people, maybe we could ship it in Vim runtime, with opt-out to current semi-XDG compliant behavior, if needed.
However, I would prefer Vim configure itself (without any options), depending on current dirs layout.


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

Christian Brabandt

unread,
9:04 AM (9 hours ago) 9:04 AM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19399)

How exactly? At the very least, we need documented (in the Vim doc itself) solution, not just a possibility to do this.

By setting the things that you want to go into different directories yourself, see e.g. here: #2034 (comment)

The bits and pieces are there, you just have to configure it.

Also I'll note that it is a good idea to maybe also support the appropriate folder on windows in AppData\Roaming.

I wholeheartedly hate using %AppData% on Windows, because it is such a messy folder and you never know should I look into Roaming or Local or LocalLow?


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

Reply all
Reply to author
Forward
0 new messages