-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add --clean to avoid loading ftplugins #119
Conversation
@dbarnett This seems to work correctly for vim 8.1.2269 (the particular test case I had issues with passes, as do all the other vroom test cases I'm aware of). Can you advise on how to check availability of the '--clean' switch? Is there an easy way to check the vim version? |
I would suggest to always attempt to start with Alternatives would be to always run |
This uses vim's '--clean' switch to avoid loading ftplugins, since this can affect behavior during vroom tests. This switch seems to avoid the issue in my local testing, whereas other things ('-i NONE', '--noplugin', etc.) don't seem to have the same effect. This falls back to trying without the '--clean' switch if vim fails to start up. I can't get vroom running in '--neovim' mode (nvim 0.4.4), so this doesn't attempt to address the issue in the neovim code path. neovim appears to define '--clean' differently from vim, so it's possible neovim may require a different fix. I verified this still respects vroom's '--vimrc' switch while having the desired behavior of avoiding plugins. Fixes #105
PTAL. It looks like the default wait time is 500ms which is more than enough for vim to recognize unknown switches. I tested this locally by changing |
# If vim exited this quickly, it probably means we passed a switch it | ||
# doesn't recognize. Try again without the '--clean' switch since this is | ||
# new in 8.0.1554+. | ||
self.start_command.remove('--clean') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I'm thinking of eventually plumbing through and posting a warning notice in the final output if we couldn't use --clean
.
That'll do the trick! Thanks! Merging. |
This uses vim's '--clean' switch to avoid loading ftplugins, since this
can affect behavior during vroom tests. This switch seems to avoid the
issue in my local testing, whereas other things ('-i NONE',
'--noplugin', etc.) don't seem to have the same effect.
I can't get vroom running in '--neovim' mode (nvim 0.4.4), so this doesn't
attempt to address the issue in the neovim code path. neovim appears to
define '--clean' differently from vim, so it's possible neovim may
require a different fix.
I verified this still respects vroom's '--vimrc' switch while having the
desired behavior of avoiding plugins.
Fixes #105