The behaviour you are describing is caused by a bug in netrw, which is the plugin handling the file browsing.
Updating to the latest version of the plugin fixes this behaviour.
To do so, just download the latest version of netrw, open it in vim and source it. Doing so will extract the plugin into your ~/.vim
directory, where it will be loaded before the system's buggy version.
Download the file:
wget http://www.drchip.org/astronaut/vim/vbafiles/netrw.vba.gz
Open it in vim
:
vim netrw.vba.gz
In vim, source it:
:so %
Afterwards, close vim. Then, enjoy browsing directories again.
Update: On one box, this gave me an error about not being able to close the last window. Had no effect on the plugin, which worked flawlessly afterwards.
2nd Update: This version of netrw expects a version of vim with the clipboard capability.
You can check if your version has it by running vim --version
. The output will probably have -clipboard
in there, which means the capability is not enabled.
To get a version compiled with clipboard support, install any version of vim with a GUI, which will also replace your normal vim
with a version with clipboard support. I used vim-gtk as a test case.
Best Answer
If you use Vim, this could be because you typed
:w@!
instead of:wq!
. On the US layout,@
is on 2, directly above QW, and right next to!
on 1. Easy to mistype.You can verify this by running Vim again, and examining the command history by either scrolling up using the up arrow key in command mode, or typing
q:
in normal mode.