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

[RFC] neovim: remove alternatives. #36165

Closed
wants to merge 1 commit into from
Closed

Conversation

atweiden
Copy link
Contributor

Closes #36164

Testing the changes

  • I tested the changes in this PR: YES

Copy link
Member

@Duncaen Duncaen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the given reasons warrant the removal of alternatives, its a choice the user can take.

If we have bash as sh and vim as vi, plocate as locate we can have neovim as vim.

@atweiden
Copy link
Contributor Author

If we have bash as sh and vim as vi

If Neovim can be Vim, Bash can be Dash.

# Template file for 'dash'
alternatives="
 sh:sh:/usr/bin/dash
 sh:sh.1:/usr/share/man/man1/dash.1"

# Template file for 'bash'
alternatives="
 sh:sh:/usr/bin/bash
 sh:sh.1:/usr/share/man/man1/bash.1"

# Template file for 'neovim'
alternatives="
  vi:vi:/usr/bin/nvim
  vi:vi.1:/usr/share/man/man1/nvim.1

The above would be logically consistent.

@Duncaen
Copy link
Member

Duncaen commented Mar 16, 2022

Making dash bash breaks all scripts with bash shebang, installing nvim before vim makes it the default provider for the vim alternative group which you can easily fix with xbps-alternatives, avoid by installing vim first (instead of alphabetically sorting xbps-install arguments or by just not installing nvim. It also doesn't break half the system, all it does is make the cursor werid on your system.

There would be no point in alternatives, if the requirement would be that they are 100% compatible, some things have stricter requirements than others, like shells, while other more interactive programs don't.

@atweiden
Copy link
Contributor Author

There would be no point in alternatives, if the requirement would be that they are 100% compatible

That’s fair, but what if we just did away with the symlink to vim? Neovim can have the vi symlink, and the result would be equal to how alternatives is handled in the shells.

It violates user expectation for vim, when typed out on any terminal in any circumstance, to ever result in Neovim being opened, unless the environment is specifically configured for such a thing.

IIRC, Void isn’t the only distro which symlinks dash to /bin/sh. Void, however, is (literally) the only distro which symlinks nvim to vim. It makes about as much sense as symlinking bash to dash.

@paper42
Copy link
Member

paper42 commented Mar 16, 2022

There would be no point in alternatives, if the requirement would be that they are 100% compatible

That’s fair, but what if we just did away with the symlink to vim? Neovim can have the vi symlink, and the result would be equal to how alternatives is handled in the shells.

I already explained in #36164 (comment) why this is not without a problem. Having vim point to nvim can only happen in specific circumstances:
a) you manually modified alternatives
b) you installed neovim first

b can be a bit surprising, but it doesn't matter, people often don't even notice they are using nvim and not vim.

It violates user expectation for vim, when typed out on any terminal in any circumstance, to ever result in Neovim being opened, unless the environment is specifically configured for such a thing.

And as we already discussed, it doesn't matter to regular users. neovim and vim are basically drop in replacements of each other.

@Duncaen Duncaen closed this Mar 17, 2022
@Duncaen Duncaen reopened this Mar 17, 2022
@atweiden atweiden changed the title neovim: remove alternatives. [RFC] neovim: remove alternatives. Mar 17, 2022
@Vaelatern
Copy link
Member

I think this is wrong. 👍 for closing.

@paper42
Copy link
Member

paper42 commented Mar 27, 2022

I agree with @Vaelatern and because there 3 team members agree on this, I am closing this PR.

@paper42 paper42 closed this Mar 27, 2022
@atweiden atweiden deleted the neovim branch March 27, 2022 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Neovim template should not contest Vim namespace in alternatives
4 participants