Skip to content

Commit

Permalink
Merge pull request #4 from kiryph/update-netrw_list_hide
Browse files Browse the repository at this point in the history
Update g:netrw_list_hide from 'wildignore'
  • Loading branch information
kiryph authored Jun 27, 2016
2 parents 9626ff1 + f7ae909 commit f71c7f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugin/vinegar.vim
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let g:netrw_sort_sequence = '[\/]$,*,\%(' . join(map(split(&suffixes, ','), 'esc
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 : '')
\ (get(g:, 'netrw_list_hide', '')[-strlen(s:dotfiles):-1] ==# s:dotfiles ? ','.s:dotfiles : '')
if !exists("g:netrw_banner")
let g:netrw_banner = 0
endif
Expand Down Expand Up @@ -78,6 +78,11 @@ function! s:escaped(first, last) abort
endfunction

function! s:setup_vinegar() abort
if exists("w:netrw_wigkeep")
let g:netrw_list_hide =
\ join(map(split(w:netrw_wigkeep, ','), '"^".' . s:escape . '. "$"'), ',') . ',^\.\.\=/\=$' .
\ (get(g:, 'netrw_list_hide', '')[-strlen(s:dotfiles):-1] ==# s:dotfiles ? ','.s:dotfiles : '')
endif
if empty(s:netrw_up)
" save netrw mapping
let s:netrw_up = substitute(maparg('-', 'n'), '\c^:\%(<c-u>\)\=', '', '')
Expand Down

0 comments on commit f71c7f5

Please sign in to comment.