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

Added compatibility with suda.vim plugin #100

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

Conversation

levihb
Copy link

@levihb levihb commented Sep 4, 2020

suda.vim is a plugin which lets you open files with sudo by using a protocol prefix, and/or automatically when opening a file that is missing read or write permissions.

Because the file path in vim is changed to suda://[the file path] this was causing the program to pass non-existent paths to range, causing it to immediately exit. So this compatibility patch just removes that prefix if suda is installed.

I don't have any experience with vimscript but I don't think there should be any issues on such a small change. I moved the path code into its own function to prevent repeat code.

@isaacItz
Copy link

Great man, I just did something similar without realizing there was an open pull request. I hope they accept it.

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.

2 participants