-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
SudoWrite not working in neovim #56
Comments
It is a known issue in neovim: neovim/neovim#8527. The conclusion is not-to-fix since the current vim approach can create other unpleasant problems too -- it is just trade-off. You can use: https://github.com/lambdalisue/suda.vim. It would be nice if @tpope can incorporate it to vim-eunuch. |
Handling the password ourselves makes me a bit squeamish but I I can't think of a practical objection. |
EDIT: Meant to post this yesterday, but only realised after posting that I hadn't refreshed the page and that the conversation had continued while I wasn't paying attention. This is caused by neovim/neovim#8217. https://github.com/lambdalisue/suda.vim demonstrates one workaround for it (explicitly reading the password with Another more secure, but less portable, workaround is to just use netrw to edit the file over SSH via Ideally we'd have a simple executable which prompted for the password then disappeared into the background, but that's a lot of complexity for the increase in security gained from the not keeping the password in Vim. At any rate, I'll leave it to people who know more than me about these things to decide. |
Oh, the re-entering of the password is a pretty huge compromise. |
stupid question: so currently |
It works if you have |
Leaving this here in case it is of any use to people using macOS + nvim. There might be better ways, but here is how I got it to work:
|
I mostly used it for :SudoWrite, but that doesn't work in Neovim (at the moment): tpope/vim-eunuch#56.
:SudoWrite, perhaps along with other commands, do not work with neovim, see tpope/vim-eunuch#56.
In the referenced Post, I realised that handling password saving inside Vim is probably not a good idea. I'm not a security expert and Vim is (probably?) not a hardened secure application. I really wanted to be prompted through the terminal, but I guess a little graphical program is fine.. See tpope/vim-eunuch#56 (comment)
I have used the SudoWrite functionality and have saved me so much time.
Recently i am not sure why i am get the following message when i do the SudoWrite.
Below is my neovim version.
:version
NVIM v0.3.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
The text was updated successfully, but these errors were encountered: