Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote -1 down vote accepted

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.

share|improve this answer
    
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 '10 at 17:24

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 .

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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