[prev in list] [next in list] [prev in thread] [next in thread]
List: vim
Subject: Re: Keep netrw buffers around
From: "A.J.Mechelynck" <antoine.mechelynck () skynet ! be>
Date: 2006-12-23 18:37:26
Message-ID: 458D7766.4030504 () skynet ! be
[Download RAW message or body]
Guido Van Hoecke wrote:
> Hi,
>
> I would like my netrw buffers to behave as normal buffers, rather than
> automagically disappear when one selects a file to edit from these
> buffers. That would mean that I could :bd the edited file, and
> automatically return to the netrw buffer to select another file from it.
>
> I have tried to achieve this with autocommands, like:
> autocmd FileType netrw setlocal buflisted
> autocmd FileType netrw setlocal bufhidden=hide
> but that doesn't do the trick.
>
> I have a couple of mappings which pretend that the buffer is still
> there by recreating it, but that is an error-prone approach:
> inoremap <c-f4> <esc>:w <bar> bd <bar> e.<cr>
> noremap <c-f4> :w <bar> bd <bar> e.<cr>
> inoremap <f4> <esc>:bd <bar> e.<cr>
> noremap <f4> :bd <bar> e.<cr>
>
> Is there some user option that can be set to modify the behaviour of
> netrw buffers so that they are 1) not deleted
> 2) listed
>
> In fact, I would like a similar behaviour for my help buffers, but that
> is lower on my wishlist. (Maybe SantaClaus could bring me that one) :)
>
> Merry Christmas and Happy New Year to you, your family and your friends.
>
> Guido.
>
Try opening your files with o (browse with horizontal split) rather than Enter
(browse in the netrw window). Then ":q" on the file buffer should bring you
back to the netrw window.
If you don't like the fact that the netrw window still takes screen real
estate after the split, use ":set winheight=99999 winminheight=0" so the
current window will expand to full height and all other windows will be
reduced to only a status line.
Best regards,
Tony.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic