Skip to content

use neovim if command is present otherwise use vim #264

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

onlurking
Copy link
Contributor

this PR will make vimgolf use neovim as the default editor if is installed in the computer, the self function is multiplataform so it will run on Windows too.

@onlurking
Copy link
Contributor Author

I don't know if using neovim as the default editor would be a sane choice, we maybe can discuss further this PR with some choices:

  • use neovim if user pass a custom flag to vimgolf cli
  • use neovim if it exists in PATH and vim doesn't

@filbranden
Copy link
Collaborator

If you prefer to use NeoVim for VimGolf, you can always set the environment variable:

export GOLFVIM=nvim

You can do so in your bash_profile, bashrc, zsh initialization script, etc.

Personally, I don't think using NeoVim by default if it's enabled is the best approach... But I can see ways in which we could make this easier to select (perhaps in the config file, selected through vimgolf setup, etc.) or we could ask the first time we launch, etc.

@danilobellini
Copy link

Many of the current solutions would not work in neovim, which makes me believe it should not be the default. Also, before enabling neovim, I think some changes to the .vimrc would be required as part of the "level playing field" requirement, including something like:

if has('nvim')
    unmap Y
endif

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.

3 participants