let g:netrw_liststyle= 3
into your .vimrc .
* let g:netrw_retmap = 1 lets a double-left click return to the
directory menu (you didn't ask, but I thought it of interest)
* let g:netrw_browse_split= 2
Regards,
Chip Campbell
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? 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.
(http://mysite.verizon.net/astronaut/vim/index.html#NETRW)
Regards,
Chip Campbell
set nocp
filetype plugin indent on
run netrwPlugin.vim
let g:netrw_browse_split = 4
let g:netrw_preview = 1
let g:netrw_liststyle = 3
and gvim -u simple.vimrc -U NONE .
I click on a file, then <ctrl-w>hjjjj (ie. move back to the directory
window,
move down a bit, and then leftmouse click on the right window). The right
window becomes selected; no change in the directory listing window.
Double-clicking doesn't affect this.
Again, I did this with netrw v136k. When you get a directory listing,
on the
second line of the banner at the far right appears (netrw v136k).
Regards,
Chip Campbell
http://mysite.verizon.net/astronaut/vim/index.html#NETRW
> Thanks for your help on this. It's pretty cool using vim like this, so
> I can simultaneously see the directory listing and open any file
> easily. I'm thinking of writing some script that will enable
> highlighting the name of the file on the directory listing if that
> file is currently the active buffer. Planning to start soon whenever I
> get some free time. I've never really written any vim script before,
> but hoping that this will be interesting.
>
Probably should use the match command in the netrw buffer. Glad you
like netrw!
> Btw, is it possible to ask vim to not show the header in a directory
> listing? By header I mean the lines starting with " at the top of the
> directory listing.
>
Currently the banner cannot be suppressed.
Regards,
Chip Campbell
+1 wishing he could suppress the banner
sc
Changing a variable's value isn't immediately tied to a screen refresh,
as can be the case
when changing a vim option via set. Furthermore, different windows may
have different
liststyles; g:netrw_liststyle acts as a default for a window. The
actual window liststyle is
w:netrw_liststyle. So
let w:netrw_liststyle= 3
<ctrl-L> (which causes a refresh)
will change the listing style. You may note that pressing the "i" key
several times does
not change g:netrw_liststyle (but it does change w:netrw_liststyle).
> I think it will be nice to have an option to hide the banner. It will
> be nice to have it implemented in future version of netrw (are you the
> author of this plugin?). Thanks.
>
The banner is of variable length depending on a few options
(hiding/showing/normal), whether
or not a target directory has been set for copying, etc. I've added
yet-another-option
(g:netrw_banner) which can be used to suppress banner display (v136l).
I hope its obvious
that I haven't had time to test all the side effects of this change.
Regards,
Chip Campbell
for yet another option i find myself hollering yet another round
of thanx! -- this one's very cool -- i've tested it all of one
time and it works great!
sc
on closer inspection i am seeing (or not, actually) the command
line in any window after having used netrw -- i can't see
messages down there either, for example nothing shows up when i
hit <ctrl>-G
sc
another thing i am seeing with it is that the
autocmd BufEnter * lcd %:p:h
i put in vimrc in place of autochdir to avoid the 'fo' problem
seems to have become irrelevant to netrw -- now when i Explore it
is on the directory i was on first when i started the session,
regardless of where i have moved since
i am not complaining, simply reporting -- if you want to take it
off-line for a full round of testing/debugging i'm good with that
too
sc
Regards,
Chip Campbell
it's available if you go to his website:
http://mysite.verizon.net/astronaut/vim/index.html
this is where the bleeding edge netrw can be gotten
if you want a set of scripts that check for a new netrw i can
send them to you, but you'll need bash, python, BeautifulSoup,
wget, and i don't know what else
sc
(http://mysite.verizon.net/astronaut/vim/index.html#NETRW)
My testing was done on a Linux box (Centos 5.2). Did you try it with the
gvim -u simple.vimrc -U NONE
command I gave? That'll avoid any issues with interfering settings and
other plugins.
Regards,
Chip Campbell