WSL: vi/vim.basic does not responds to keyboard input.
-
Your Windows build number: (Type
verat a Windows Command Prompt) 16193 Does not occur in 15063 and 16188. -
What you’re doing and what’s happening: (Copy&paste specific commands and their output, or include screen shots) Launch
vidoes immediately hang. no longer responds. If killed vi process, returned terminal will not responds. But, react tokill -HUP. Does not occur usingvim.tinyorvi -u NONE. -
What’s wrong / what should be happening instead: Can edit file.
-
Strace of the failing command, if applicable: (If
<cmd>is failing, then runstrace -o strace.txt -ff <cmd>, and post the strace.txt output here) https://gist.github.com/0xbadfca11/00a1efe36b690dc1927fd844355a125e/raw/e1c50b41c59f594ab557ebb1ae73736e05366f08/strace.txt
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 5
- Comments: 48 (11 by maintainers)
@all - Thanks all for chiming in. With your support, the bug has been approved for fast-track.
If you don’t need fancy terminal features, setting TERM to something like vt100 works. E.g.:
TERM=vt100 vi ~/.bashrc
Don’t worry, we already have for this committed and on it’s way up 😃
@nickperry @Warblefly @mdavidsen & others: A polite notice:
I appreciate that this issue is a significant impediment at best, and a major PITA at worst, but I would like to point out that:
Also, its important to understand the following:
If you can tolerate a smaller amount of disruption, please adjust your settings to subscribe to slow-ring updates where fewer issues will appear.
If you cannot tolerate even a small amount of disruption, please do not use Insider builds: Fully released versions of Windows are likely your best option.
Thanks everyone for your support: Your bug reports and feedback is enormously valuable, but we do ask for a little patience and understanding as we progress through each release cycle.
@warpdesign If all goes according to plan, it’ll likely be in next week’s Insider fast-ring build. That’s as fast as it can move up and out.
For those complaining, DO NOT USE FAST RING IF YOU’RE UNWILLING TO SUFFER SOME CONSEQUENCES!!!
I look forward to this getting fast tracked.
I simply changes my term via an alias to get around it. Used nano for a bit too.
Good job Microsoft. Keep it up.
Found this after a lot of head-banging (including removing and reinstalling WSL). I’m using an alias to workaround this (alias v=‘TERM=vt100 vim’ - Thanks @aledell!). Would love for this to get bumped up in priority. I’m not looking forward to using emacs for a while. 😆
@warpdesign Yes this is a console change that broke this. We had a pretty high code delta that this bug was introduced in. These kinds of issues are expected with Insider’s builds.
I’m not positive that this will work, but based on what the fix for this bug was, it might be possible to get around this bug:
I believe that if you immediately start hitting a key on the keyboard after launching vi (eg, spamming ‘enter’), then you’ll avoid the bug case, and vi will work normally. It might not work on faster (normal) PC’s, but it does work on my VMs. The key is to have some input in the input queue as vi is launching.
@Warblefly - First, let me acknowledge that breaking
viis something that we are definitely not proud of. We understand the pain. The issue is fixed internally in our dev branch and we would like to fast-track it. But, we can use your and others help with that. If more people want the fix faster, its easier for us to justify the fast-track. So, if this is important to you and anyone else, please chime in here.We are always happy to hear when someone tells us that WSL is useful within the education industry. And, we are glad you can use this as your daily driver.
@offero Considering the initial issue described by this thread was confirmed fixed over a year ago, what you’re seeing is almost certainly a new issue. Could you open a new issue on this repo to track and debug what you’re seeing now (rather than necro’ing an old thread)?
PS: fixed in today’s update!
@djensen47 - It should be fixed in the next release. Sometimes things do get held up for reasons outside our direct control. Apologize for the delay and the inconvenience caused. And, thanks for your patience.
Here is a convenient summary of the workarounds. You can do this on the command line or update your
~/.bashrcDo this if you don’t want to universally set the TERM to vt100.
I have a workaround because this bug has, unfortunately, become mission-critical this morning.
Use sshd.
sudo mkdir /var/run/sshdsudo chmod 0755 /var/run/sshd/etc/ssh/sshd_configto allow this (use the pico editor to changePasswordAuthenticationfromnotoyes)sudo start-stop-daemon --start --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- -p 22Now use something like PuTTY to log into localhost (127.0.0.1) and Vim, in all its colours, works. For the complete experience, change your PuTTY font to ‘Consolas’.
You will need to login with your Ubuntu on Windows username and password (i.e. the password with which you set-up Ubuntu on Windows when you first installed it). You did make a note of that password, didn’t you?
Bizarrely, the console as displayed by PuTTY.exe feels more responsive than the native console window.
Fair enough. I understand the release schedule is decided elsewhere. Just so you and the team know, I use this subsystem every day for compiling lots of code, and its output is a vital part of my work at a major British university. The compilation still works and I can use another editor beside vim for now. It’ll be nice when it’s back.