-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Labels
Comments
I think it would be good to do it for $XDG_CONFIG_HOME/vim too. |
Now that I think, you need to have a |
Wrong, it is. |
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
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
withsyntax 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.
The text was updated successfully, but these errors were encountered: