On Jul 28, 2:20 am, Charles E Campbell Jr <[email protected]>
wrote:
> googler wrote:
>
> > I have been using gvim in certain cases as you had suggested. I have a
> > gvim session up. The left window is a directory listing and the right
> > window is an open file (opened by pressing 'enter' on one of the file
> > names on the left window). I pressed the key i a few times for the
> > left window to get a hierarchical listing. Also, I have set
> > g:netrw_browse_split to 4. So things are good, except for one annoying
> > problem. When the cursor is on the left window and I click on the
> > right window to make it the active window, that does not happen.
> > Instead what I get is that the directory listing disappears from the
> > left window and in its place it opens a new file for editing. The name
> > of this file is the same as the line on which I had clicked on the
> > right window. Clearly, this is not what I wanted and I have to bring
> > back the directory listing by doing a :Explore. Usually (while not
> > listing directory contents), I can click on a window to make it the
> > active window and it works fine there. Why is it not working in this
> > case then? How do I avoid this problem? Thanks!
>
> Hello!
>
> I'm afraid that I'm not seeing this behavior. For one thing:
>
> gvim .
> :let g:netrw_browse_split= 4
> click on a file with leftmouse button
>
> yields a window with the file contents atop the directory window, not
> side by side as you've suggested above. Perhaps you have more options
> set?
Yes, if I have g:netrw_browse_split set to 4 and no file is open yet,
by default vim creates a horizontal split window to open a file. To
avoid this, I had already created a vertical split window by :vsp and
after that I'm opening other files on that window. This is actually
one question I had in mind - is it possible to open in vertical split
mode instead of the default horizontal split?
> I did this with the following "simple.vimrc":
>
> set nocp
> filetype plugin indent on
> let g:netrw_browse_split = 4
> let g:netrw_liststyle = 3
>
> and using gvim -u simple.vimrc . Anyway, clicking on the directory
> window just made it the active one; it didn't select&open a file for
> editing. I'm using netrw v136k . What version of netrw are you
> using? If its not v136k, may I suggest that you try it out.
Perhaps you misunderstood my problem. The left window is directory
listing and the right window is an open file. The left window is
active. Now I click somewhere on the _right_ window wishing to make it
the active window. This makes the directory listing disappear on the
left window and a new file opens up in its place. Assuming the line I
clicked on the right window has "abcdefgh wxyz", the name of the file
that just opened up will be "abcdefgh wxyz".
Actually I'm not very sure with the click -- whether it's going as a
single click or a double click on my computer. You can try double
clicking if you want and see if you get the same thing.
I'm using gvim 7.2, although I'm not sure about the netrw version.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---