Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It looks like this might be a bug in the netrw plugin. I tested with several versions of netrw with two builds of Vim 7.3 (MacPorts <code>vim</code> 7.3-353, and MacPorts <code>MacVim</code> “snapshot64” 7.3-390):</p> <ul> <li>v140 (included in the MacPorts <code>vim</code>: 7.3-353)<br> Tested only with the MacPorts vim build.</li> <li>v141 (from the <a href="http://www.vim.org/scripts/script.php?script_id=1075" rel="noreferrer"><code>vim.org/scripts</code> netrw page</a>)</li> <li>v142 (from the <code>vim.org/scripts</code> netrw page)</li> <li>v143 (included in MacPorts <code>MacVim</code>: 7.3-390)<br> Tested only with the MacPorts MacVim build.</li> <li>v144b (pre-release from the <a href="http://www.drchip.org/astronaut/vim/index.html#NETRW" rel="noreferrer">netrw author’s Vim page</a>)</li> </ul> <p>You can check your active netrw version with <code>:let g:loaded_netrwPlugin</code>.</p> <p>v140 through v142 all had reasonable behavior when reproducing your scenario:</p> <ul> <li>Only the netrw buffer (from <code>sp .</code>; right side, upper window) is read-only.<br> The <code>fileA.cpp</code> buffer in the window on the left remains non–read-only.</li> </ul> <p>With v143 and v144b I was able to reproduce your behavior:</p> <ul> <li>Both the netrw buffer (right side, upper window) and the <code>fileA.cpp</code> buffer (left side) become read-only.</li> <li>Additionally (i.e. not reported by the OP, but seemingly related), the <code>fileA.cpp</code> window on the left side becomes the active window.<br> Normally, the right side, upper window (the one from the <code>sp .</code>) should be active. </li> </ul> <p>The <code>fileA.cpp</code> window was originally a netrw window (from <code>vsp .</code>). My guess is that something in v143 and v144b is a bit overzealous in resetting the old window for some reason (it probably should not be touching that window at all). <code>sp fileB.h</code> avoids the problem by not invoking netrw (i.e. the problem is not with splitting windows, but with something that netrw does when it creates the directory listing buffer).</p> <hr> <p>If your problem is coming from netrw (i.e. your behavior matches my description, and your directory listing buffers have the text <code>Netrw Directory Listing</code> and (e.g.) <code>(netrw v143)</code> on the second line—assuming you have not disabled the netrw banner), then you may be able to fix it by installing an older(?) version of netrw (i.e. v142).</p> <p>netrw is packaged as a “vimball archive”. The vimball plugin comes with Vim 7.0 and later. You just source a vimball file to install it to the first directory in your <code>runtimepath</code> (usually <code>~/.vim</code>).</p> <pre><code>:e /path/to/netrw.vba.gz :so % :q </code></pre> <p>If you are using <a href="https://github.com/tpope/vim-pathogen" rel="noreferrer">pathogen</a> to isolate your Vim plugins (highly recommended!), you can install it to a bundle directory instead:</p> <pre><code>:e /path/to/netrw.vba.gz :UseVimball ~/.vim/bundle/netrw :q </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload