The weird behaviour I was seeing included:

  • :Ex might open an empty window
  • Use of - as a shortcut to go up to the parent directory in netrw, would make the entire shell non-responsive (or at least, appear that way)...
  • :Lexplore opened some weirdly hidden tab (the command appeared to do nothing, but when I :q from vim, it then took me to a netrw 'tab', almost as if it's another tab expect it's not listed under :tabs).
  • vim . was just resulting in an empty window with the E17 error message.

This occurred for me when using:

App: Vim 8.2.3020 on Windows 10
Terminal: Windows Terminal Preview
Shell: PowerShell 7.1.3
Module: PSReadline 2.2.0 beta 3

I suspect it will be a perplexing issue for someone, at some stage, so see my 'answer' (you can sort of call it that, if you squint a bit), below. If anyone has better work-arounds or mitigations, please let me know!

  • For others: E17 error is this: E17: <dir> is a directory
    – 3N4N
    Commented Jul 16, 2022 at 7:09

1 Answer 1


I narrowed down the cause in my case to PowerShell with PSReadLine. I can't report this as a bug, as it's seems to just be more like a conflict than a fault with any given piece of software, hence why I'm putting a note about it on Stackexchange.

If you are seeing weird behaviour/bugs/glitches from netrw in VIM, specifically when running it from a shell that uses the PSReadLine script/module, try removing that from the current session (Remove-Module PSReadLine) and then testing vim and netrw again.

I suspect this could be worked around by tinkering with PSReadLine key bindings (start hunting from Get-PSReadLineKeyHandler). My best guess (and that's all it is), is it might be to do with the Alt+- binding, described as Alt+- DigitArgument Start or accumulate a numeric argument to other functions. How 'Alt' is getting involved via netrw I wouldn't know, but the symptoms sort of fit the idea that PSReadLine is now taking input as some sort of accumulation to exec or pass later, hence why the shell appears unresponsive...that's my guess anyway.

  • 1
    I'm using nvim, so it may not be relevant, but I'm not facing these issues with pwsh and PSReadLine. You should file a bug report in vim's GitHub repo. At the very least you'll get confirmation whether the issue is reproducible.
    – 3N4N
    Commented Jul 16, 2022 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.