3

In gvim using netrw(the file explorer), I usually middle click a file to open it in the last active window. This just leads to an error stating "Cannot make changes, 'modifiable' is off". Another middle click, and the file opens fine where I expect it to. All buffers are saved, there's no uncommuted changes anywhere.

What causes this, and what can I do about it?

Here's a picture of when I middle click a file:

gvim screenshot

2 Answers 2

-1

Use left-click to open a file from the listing (if you didn't remap your mouse buttons).

Middle click inserts from the clipboard into the clicked buffer, and the directory listing cannot be edited -- or at least not in the same way like text buffers.

1
  • Left mouse opens the file in the same buffer as the netrw buffer, I want to keep the netrw window. What would I do to remap left mouse to open in the previous windows (Like hitting O in the netrw buffer). But that explains the error with middle mouse. FIrst click tries to do a clipboard copy, second one does open the file.
    – nos
    Feb 14, 2010 at 17:24
0

Use :Lex to open the netrw browsing window, and then you may use leftmouse clicking to open the file. You'll need a netrw newer than Nov 9, 2013 (v150+). The most recent netrw: v153r, which you can get from http://www.drchip.org/astronaut/vim/index.html#NETRW .

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .