s:setup_vinegar() seems never to be triggered
kiryph opened this issue · 1 comments
I was trying to solve #69 myself. However, a simple move of let g:netrw_hide_list = ...
to s:setup_vinegar()
does not work.
I have observed in general that a simple echo message in s:setup_vinegar()
is never listed in :messages
function! s:setup_vinegar() abort
echo "Updating g:netrw_list_hide within s:setup_vinegar()"
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 : '')
Addition
Following the discussion of
http://vi.stackexchange.com/questions/7890/how-to-display-line-number-in-netrw
au FileType netrw set nu
does not work, but a special netrw variable (available in recent netrw versions) let g:netrw_bufsettings = 'noma nomod nu nobl nowrap ro'
So I am wondering whether vinegars autocmd does work
augroup vinegar
autocmd!
autocmd FileType netrw call s:setup_vinegar()
augroup END
A simple change to
augroup vinegar
autocmd!
autocmd FileType netrw echom "Greetings from augroup vinegar"
augroup END
,as far as I can confirm, does not change anything.
Following calls a custom function only when entering a file from netrw not when entering a netrw window.
fun! MyFuncRef()
echom "Greetings from netrw_funcref"
endfun
let g:Netrw_funcref= function("MyFuncRef")
vim version: 7.4.1831
netrw version: v156
Resolved this issue, netrw has an autocommand which silence messages.
function! s:setup_vinegar() abort
unsilent echo "Updating g:netrw_list_hide within s:setup_vinegar()"