Enno wrote:
Am Freitag, 23. Mai 2014 10:42:55 UTC+2 schrieb Enno:
Can one configure netrw so that when opening a file in netrw the just left
netrw buffer is automatically deleted?
For example type :e ., navigate to a file, hit <CR>. Then there is the netrw
buffer, created by :e . that we just left, and has done its service. Is there an
autocmd to delete it? Naive attempts under Gvim 7.4.282 and Windows 7 64 bit failed.
I forgot the additional netrw settings by Vim-Vinegar. The ones just posted are
set after these:
let g:netrw_sort_sequence = '[\/]$,*,\%(' . join(map(split(&suffixes, ','),
'escape(v:val, ".*$~")'), '\|') . '\)[*@]\=$'
let s:escape = 'substitute(escape(v:val, ".$~"), "*", ".*", "g")'
let g:netrw_list_hide =
\ join(map(split(&wildignore, ','), '"^".' . s:escape . '. "$"'), ',') .
',^\.\.\=/\=$' .
\ (get(g:, 'netrw_list_hide', '')[-strlen(s:dotfiles)-1:-1] ==#
s:dotfiles ? ','.s:dotfiles : '')
let g:netrw_banner = 0
Hello, Enno:
I just tried
vim -u enno.vimrc .
, navigated to a file, hit <cr> -- and the netrw browser disappeared
and the selected file appeared in its stead. Thus, the "just left netrw
buffer" was automatically deleted (actually, its still there; if you
try :ls! you should see it, but otherwise :bn :bp et al will ignore
it, etc). I did this with netrw v153g, which you can get from my
website: http://www.drchip.org/astronaut/vim/index.html#NETRW.
I had to comment out the g:netrw_list_hide stuff because s:dotfiles is
not defined.
There were no changes that I made for this; I suspect its a vim-vinegar
thing. Please rename vim-vinegar so that it doesn't get used and see if
the problem you're complaining of disappears too.
Regards,
Chip Campbell
--
--
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
set nocp
filetype plugin on
let g:netrw_banner = 0
let g:netrw_special_syntax = 1
let g:netrw_dirhistmax=100
let g:netrw_winsize=30
let g:netrw_altv = 1
let g:netrw_altfile=1
let g:netrw_preview=1
let g:netrw_chgwin = winnr()
let g:netrw_retmap = 1
let g:netrw_home = $HOME."/.cache"
let g:netrw_liststyle=3
let g:netrw_sort_sequence = '[\/]$,*,\%(' . join(map(split(&suffixes, ','),
'escape(v:val, ".*$~")'), '\|') . '\)[*@]\=$'
let s:escape = 'substitute(escape(v:val, ".$~"), "*", ".*", "g")'
"let g:netrw_list_hide =
" \ join(map(split(&wildignore, ','), '"^".' . s:escape . '. "$"'), ',') .
',^\.\.\=/\=$' .
" \ (get(g:, 'netrw_list_hide', '')[-strlen(s:dotfiles)-1:-1] ==#
s:dotfiles ? ','.s:dotfiles : '')
let g:netrw_banner = 0