[vim/vim] Feedback and question about xdg.vim (Issue #19514)

15 views
Skip to first unread message

Diego Viola

unread,
Feb 26, 2026, 2:50:54 AMFeb 26
to vim/vim, Subscribed
diegoviola created an issue (vim/vim#19514)

I noticed that xdg.vim was added after the discussion in #19421.

It seems the approach is to have a way for users to do :ru xdg.vim and have the XDG paths set for them automatically, fair enough.

I see a couple of problems with this. First, the file says:

  " These options are not set by default because they change the behavior of
  " where files are saved. Uncomment them if you want to fully move all
  " transient/persistent files to XDG directories.

Now let's consider that $VIMRUNTIME isn't always writable by the user, they might not have root access. Furthermore, making changes to files in /usr isn't good practice because an update can overwrite them.

Users would have to make the change in their ~/.config/vim/vimrc anyway. With this in mind, the xdg.vim feels redundant.

Correct me if I'm wrong, but I think a better approach would have been to provide instructions for setting such paths rather than providing xdg.vim.


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

Vinfall

unread,
Apr 17, 2026, 1:00:41 AMApr 17
to vim/vim, Subscribed
Vinfall left a comment (vim/vim#19514)

From previous discussion I concluded the defaults might never be changed. With this in mind, add source $VIMRUNTIME/xdg.vim to my vimrc sounds elegant enough.

A similar approach would be exporting something like VIM_XDG=1 in .profile or at runtime, but to me that's basically the same. You get a cleaner home directory in exchange of polluting either your environment variable or your vimrc.


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

Andrey Butirsky

unread,
2:47 PM (8 hours ago) 2:47 PM
to vim/vim, Subscribed
bam80 left a comment (vim/vim#19514)
  " These options are not set by default because they change the behavior of
  " where files are saved. Uncomment them if you want to fully move all
  " transient/persistent files to XDG directories.

Now let's consider that $VIMRUNTIME isn't always writable by the user, they might not have root access. Furthermore, making changes to files in /usr isn't good practice because an update can overwrite them.

Maybe the wording could be improved, but I think it's meant up to the user whether to change it in /usr or override/amend in his vimrc, if needed. The latter is probably cleaner, but it's just meant to be self-explanatory, after all xdg.vim is just a usual script.

Having that, I think it's important to have such a script in Vim distribution, as it contains bare minimum of what users wanting XDG could build upon, and most of them could just run it as is.

Thank you for your feedback.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/19514/4536454278@github.com>

Reply all
Reply to author
Forward
0 new messages