Wednesday, May 5, 2010

Re: Problem with opening files and directories on the command line

On 2010-05-05, Dennis Benzinger wrote:
> Hi!
>
> If I try to open a directory and some files on the command line by using
>
> vim -o dir file1 file2
>
> I get three split windows with the following buffer names in their
> statusline: NetrwTreeListing 1, dir, dir
> The topmost windows shows the contents of the current directory in netrw.
> But it only shows the directory dir, not the two files.
> The other two windows are empty. When I move the cursor to the empty windows
> (Ctrl-W j) they start to show the same strange netrw listing with the files
> missing. The buffer names in the status line then change to
> NetrwTreeListing 2 and NetrwTreeListing 3.
>
> I'm using Vim 7.2.411 and the netrw windows show v136.
>
> Can anyone reproduce this or is it a problem with my configuration?

I see the same thing. I was about to report that it worked for me
because I tried it with this command line:

vim -N -u NONE --cmd 'runtime plugin/netrwPlugin.vim' -o . foo.m foobar.vim

and with that command it does work fine. But then I realized that I
wasn't faithfully reproducing your example, so I changed the
directory from "." to "tmp":

vim -N -u NONE --cmd 'runtime plugin/netrwPlugin.vim' -o tmp foo.m foobar.vim

That command fails for me almost the same way it did for you: the
top window contains the directory contents and has the name
"[Scratch] [RO]"; the other two windows are empty and have the name
"tmp".

The cursor starts in the top window. When I type ^W^W to move to
the second window, the second window fills with the same directory
contents and the name in the status line changes to "[Scratch]
[RO]". Typing ^W^W again moves the cursor to the bottom window
which again fills with the directory contents, but this time the
name in the status line becomes the name of the directory,
"/home/garyjohn/tmp [RO]".

I'm using Vim 7.2.411 and netrw v137d on RHEL4.

Regards,
Gary

--
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

No comments: