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

9 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,
1:00 AM (9 hours ago) 1:00 AM
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>

Reply all
Reply to author
Forward
0 new messages