Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider switching to the XDG runtime when no vimrc exists but ~/.config/vim does #14766

Open
diegoviola opened this issue May 13, 2024 · 4 comments

Comments

@diegoviola
Copy link
Contributor

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.

@diegoviola
Copy link
Contributor Author

I think it would be good to do it for $XDG_CONFIG_HOME/vim too.

@diegoviola
Copy link
Contributor Author

Now that I think, you need to have a ~/.config/vim/vimrc with syntax on anyway, given that it is not set by default.

@diegoviola
Copy link
Contributor Author

Now that I think, you need to have a ~/.config/vim/vimrc with syntax on anyway, given that it is not set by default.

Wrong, it is.

@vim-ml
Copy link

vim-ml commented May 13, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants