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
extend :checkhealth to migrate vimrc #4877
Comments
@justinmk I think it is nice feature, but all the situation should be considered.for me |
I think this should work like this:
Should this be done in viml as a plugin or should it be hardcoded? |
autoload VimL function if MYVIMRC is empty? |
👎 for creating stuff in the user's home directory when it isn't needed.
👍 for helping migrate existing settings. |
No we wouldn't. Other metadata (e.g., the shada directory) is created that can detect whether the user has run nvim before. But if it came down to a choice between risking prompting the users multiple times or creating unnecessary content, I would come down on the side of doing nothing. We already have better defaults. I don't see a reason to create files the user may not want just because so many other programs have that disease. |
Fair enough ;) |
I agree with jamessan. |
Hmm, feels a bit like too much handholding. Maybe we should rather go for an explicit command like And Neovim should be usable without hassle for people who just want to quickly edit config files (without having an own init.vim), like so many admins do. |
@mhinz nice idea. |
We could actually make |
I emphatically agree with that sentiment, my thinking was that silently creating an empty init.vim is no worse than silently creating a viminfo file. Remember this is only for invocations where
|
An empty init.vim has no added benefit to the user experience (unlike an empty vimrc did with Vim), while a viminfo/shada file is beneficial.
I do see the benefit to this, but for me it's still not enough to create unnecessary content in the user's $HOME. Those commands would have worked fine pre-XDG since there wasn't an intermediate set of directories that may need to be created. In a sense, we've made that aspect of the initial UX worse. |
Isn't that another reason in favor of creating the file by default? To save the user the hassle of bootstrapping that path. |
IMO, no, because it perpetuates the misbehavior of programs creating unnecessary files. It's simple enough to document the default location of the init.vim and people can create it if they want (or have it created by |
I think that if on startup ~/.vimrc or ~/.vim exists but ~/.config/nvim does not, it should tell the user that the config files have moved and offer to:
|
From the nvim-from-vim document, the suggestion is to put the following lines in your init.vim
If there is no init.vim and there exists a .vim or .vimrc, why not offer to create an empty init.vim in the default location and also offer to insert the above lines into it? |
If running interactively, we should:
create an init.vim automatically~/.vimrc
exists and offer to import it (or link to it? one or the other, not both--keep it simple)The text was updated successfully, but these errors were encountered: