6

I am new to vim, and I use netrw as a file explorer.

Frequently hit shift-P to open a file in a buffer. Sometimes I accidentally hit shift-O, and netrw will start obtaining the file. How do I cancel cancel that?

Two changes I see happen are a new split opens with the below message

warning (netrw) cannot determine method (format: protocol://[user@]hostname[:port]/[path])

Which I can close. But also I see a message in the status/message bar. What I really want to do is get rid of that message: Obtaining index.html

enter image description here

The above documentation, suggests that the message will end when the transfer completes. So maybe I need to cancel the transfer. I scanned/searched the above documentation for the words cancel and transfer and found nothing to suggest a fix.

6
  • What about Ctrl-C?
    – ryuichiro
    Commented Oct 2, 2015 at 22:29
  • That does not seem to help. I can tell you when I hit shift-O, I get a new split with the message: "warning (netrw) cannot determine method (format: protocol://[user@]hostname[:port]/[path])".
    – TMB
    Commented Oct 12, 2015 at 13:35
  • You can try to put let g:netrw_silent= 1 in your .vimrc (you can find it here). I hope it will help.
    – ryuichiro
    Commented Oct 12, 2015 at 15:26
  • sorry, no dice :(
    – TMB
    Commented Oct 12, 2015 at 19:01
  • Chipping away at this, it is being set in status line: set statusline? to see how it modified it.
    – TMB
    Commented Oct 14, 2015 at 15:07

2 Answers 2

6

Just call

:set statusline&
1
0

I'm using netrw v155d; I don't see the split taking place (just the error message, which a :q handles just fine). Perhaps you should try updating your netrw: http://www.drchip.org/astronaut/vim/index.html#NETRW

2
  • 1
    Are you sure you don't have use errorwindow set? I am pretty sure I found my answer.
    – TMB
    Commented Nov 23, 2015 at 2:30
  • 1
    Thankyou @TMB, g:netrw_use_errorwindow was the setting I was looking for, that error window has been driving me nuts!
    – nickspoon
    Commented Mar 12, 2017 at 22:30

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.