Skip to content

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