5

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.

TMB
  • 203
  • 1
  • 9
  • What about Ctrl-C? – ryuichiro Oct 02 '15 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 Oct 12 '15 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 Oct 12 '15 at 15:26
  • sorry, no dice :( – TMB Oct 12 '15 at 19:01
  • Chipping away at this, it is being set in status line: set statusline? to see how it modified it. – TMB Oct 14 '15 at 15:07
  • I guess I could write a function? that intercepts shift-O, stores statusline, executes shift-O, and if g:netrw_silent==1, reset statusline... – TMB Oct 14 '15 at 15:10

2 Answers2

5

Just call

:set statusline&
TMB
  • 203
  • 1
  • 9
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

user21497
  • 811
  • 5
  • 5