Tuesday, September 3, 2013

Re: netrw (?) breaking window navigation on stock Debian Stable

Tim Chase wrote:
> I'm fairly certain I haven't initiated any changes that would impact
> this, but I just noticed this today and am trying track down when/why
> it happened, and how to solve it.
>
> To replicate on Debian Stable:
>
> bash$ cat reproducible_vimrc
> set nocp
> syn on
>
> bash$ vi -u reproducible_vimrc some_dir/
>
> this should open the contents of the directory in a netrw window
> (":set ft" returns "netrw"). From here, issue ":new" or select a
> file/subdirectory and press "o" to open it in a new window.

So far, no problem...
> From
> here, I tried to navigate back to the original netrw directory listing
> using <c-w>k to open other files but vim refused to navigate back to
> the window (no error message, just a failure to navigate to the
> window as would normally happen).

I'm not seeing this (vim 7.4.5, netrw v150f): ie. using <c-w>k to change
windows worked.
> I also tried ":wincmd k" with
> identical failure. Additionally, things like
>
> :let @a=''|windo 1yA
>
> fails to visit all the windows, and @a remains empty (not even
> pulling in the first line of the file I'm currently in).

Doing this yields: E492: Not an editor command: 1yA .
Modifying it to
:let @a=''|windo norm! 1yA
yields
E21: Cannot make changes, 'modifiable' is off

because the netrw window ended up as the final window.
> Similarly
>
> :windo $
>
> doesn't move my current window to the last line, let alone the netrw
> window.
This command caused the cursor to move to the last line of both windows.
>
> If I issue
>
> vi -u reproducible_vimrc some_dir/
>
> and then issue ":new", I have similar problems with navigating back
> into the netrw window. If I use "--noplugin", it no longer seems to
> load the netrw plugin at all (expected), so I have control over my
> windows still.
>
> The headers of /usr/share/vim/vim73/autoload/netrw.vim state that
> it's
>
> " Date: Apr 05, 2012
> " Version: 145
>
> It works as I'd expect in the other environments I have available:
> Vim 7.0 (on Win32, with r98 of netrw) and Vim 7.3.457 (on Ubuntu,
> with the same r145 of netrw).
>
> Is there something I'm missing, or some assumption that netwr makes
> about my vimrc that would trigger this behavior? Or a way to track
> down the problematic behavior?
>
Yes -- may I suggest that you upgrade your netrw to the latest (v150f)
from my website:

http://www.drchip.org/astronaut/vim/index.html#NETRW

Regards,
Chip Campbell

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment