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
":w :term ..." (WAS: "w !sudo ..." does not work) #1716
Comments
Can confirm. |
Sometimes it works (for me), but I have experienced the same problem. I'm on 951d00a. |
With a test.py like:
using
Is it that nvim and the subprocess are fighting over the input or something? |
FWIW I've began working on a fix for this and all other terminal-related issues |
This still seems to be an issue after #1820 |
@fmoralesc I'm currently extending the job module to allow spawning tty programs. After that I will integrate nvim with libvterm which will be used for running shell commands(in other words, bang commands will be ran in terminal windows, which will fix this issue) |
@tarruda excellent!
|
Changed the title to reflect what I propose is the solution to this issue: allow
There should be similar functionality for |
I do not like the idea for special-casing
Note: all these things may be done by the plugin with the clever use of Note 2: |
That's what I am proposing. |
@justinmk But without the details it is hard to understand. You suggested |
@justinmk Is there any workaround to do a |
@davidsteinberger You may be able to replace I have not actually checked whether this variant will work (whether they pass stdin to the launched application) though. |
This comment has been minimized.
This comment has been minimized.
Here's a (ugly) workaround:
|
@pjg Now I have to open a new terminal tab and type cmd like |
I've also got an ugly workaround: " Temporary workaround for: https://github.com/neovim/neovim/issues/1716
if has("nvim")
command! W w !sudo -n tee % > /dev/null || echo "Press <leader>w to authenticate and try again"
map <leader>w :new<cr>:term sudo true<cr>
else
command! W w !sudo tee % > /dev/null
end Adding |
I made a plugin which solves this issue on neovim. https://github.com/lambdalisue/suda.vim In case if you guys are looking forward the solution 👍 |
This comment has been minimized.
This comment has been minimized.
Suddenly after updating (it was a lot of commits so I haven't yet tried to bisect it) I'm also experiencing this. sudo reports this error:
|
@Earnestly see #8389 |
Sooo, I just ran into this too, what's the official status of this? A wontfix? Will be fixed but in a different way? Cuz I don't really wanna run all of neovim as root necessarily. |
Can't tell you about the status, but just for this particular usecase, |
@LunarLambda It is not wontfix, otherwise it would have been closed. However, I'm going to merge it with #1496 because both issues have the same root cause/solution. Resolution/Summary
Locked to keep the summary visible. You can always chat or open a new issue if you have new information/topics to discuss. |
when i use the follow in vim it works but neovim will never successfully accept the password:
:w !sudo tee % > /dev/null
The text was updated successfully, but these errors were encountered: