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

alias vi to neovide and something unexpected will happen. #10275

Closed
LeeeSe opened this issue Jan 30, 2024 · 2 comments
Closed

alias vi to neovide and something unexpected will happen. #10275

LeeeSe opened this issue Jan 30, 2024 · 2 comments
Labels
upstream we can't fix it

Comments

@LeeeSe
Copy link

LeeeSe commented Jan 30, 2024

YOUR TEXT HERE
fish, version 3.6.4

macOS14 alacritty and rio or Terminal.app all have this problem

when i alias

alias vi="neovide"

when i input vi / ,the neovide GUI will automatically pop up
image

But when I type neovide /, nothing happens.
image

@faho
Copy link
Member

faho commented Jan 30, 2024

Fish vi completions check if your vi is really vim by running vi --version:

# Check if vi is really vim
if vi --version >/dev/null 2>/dev/null
complete -c vi -w vim
else
complete -c vi -s s -d 'Suppress all interactive user feedback'

It appears neovide just ignores --version. This isn't really something we can support, in general fish's completions assume that a thing called "vi" will behave roughly like "vi".

So the solution is to simply: Don't alias neovide to "vi".

If you wish to take this upstream, tell neovide to support "--version" by printing something to the terminal and exiting.


Alternatively, fix all your problems with "alias" with this one weird trick and just use an abbreviation instead:

abbr vi neovide

@faho faho closed this as completed Jan 30, 2024
@faho faho added the upstream we can't fix it label Jan 30, 2024
@LeeeSe
Copy link
Author

LeeeSe commented Jan 30, 2024

Thank you for your reply, I understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream we can't fix it
Projects
None yet
Development

No branches or pull requests

2 participants