On 2024-05-13, Diego Viola wrote: > Please consider doing a runtime switch to the XDG one when a ~/.config/vim > directory exists. > > Currently the runtime switch happens when ~/.config/vim/vimrc exists, and > that's fine. > > However, while testing #14757 yesterday, I ran into some issues when I dropped > the syntax files in ~/.config/vim/syntax, I didn't have a vimrc anywhere and > somehow expected it to work. > > A fix for that was simple, just create a minimal ~/.config/vim/vimrc with > syntax on and that was it. > > I think it would be a lot better if Vim also checked for the presence of ~ > /.config/vim and enabled the XDG runtime in those cases. > > I think this is how ~/.vim currently works anyway, you don't have to have a > vimrc in ~/.vim and your syntax files will be sourced regardless. > > There may also be a chance that I misunderstood something, if so please let me > know and feel free to close this issue.
I may be missing something, too, but I think you're right. I didn't think about that enough during the PR review. The location of the user's vim directory should be determined by searching that prioritized list of places and selecting the first one that is actually a directory or a link to a directory. The location of the user's vimrc should be determined separately. It should be $HOME/.vimrc if it exists, else vimrc under the directory found above. Regards, Gary -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20240513180549.GH24132%40phoenix.