New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file_rec/git does not respect ignore_pattern and ignore_globs #886
Comments
OK. I will check it. But... |
Unfortunatelly, I cannot reproduce the problem. ignore_globs working. |
For this full When I type |
Please upload your unite.vim version. |
I tested your minimal .vimrc, but jpg files are not presented. |
@chenhouwu Please upload your png file extensions. |
Please upload your unite.vim version. |
@chenhouwu Please check the function in your unite.vim/candidates.vim. function! s:ignore_candidates(candidates, context) "{{{
let candidates = copy(a:candidates)
if a:context.ignore_pattern != ''
let candidates = unite#filters#vim_filter_pattern(
\ candidates, a:context.ignore_pattern)
endif
if !empty(a:context.ignore_globs)
let candidates = unite#filters#filter_patterns(candidates,
\ unite#filters#globs2patterns(a:context.ignore_globs),
\ unite#filters#globs2patterns(a:context.white_globs))
endif
if a:context.path != ''
let candidates = unite#filters#{unite#util#has_lua()? 'lua' : 'vim'}
\_filter_head(candidates, a:context.path)
endif
return candidates
endfunction"}}} Please upload |
candidates:
|
Not candidates value. |
seems |
OK. I get it.
|
Your .vimrc is broken. Corrected version is here: " Note: Skip initialization for vim-tiny or vim-small.
if !1 | finish | endif
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
" Required:
call neobundle#begin(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
" My Bundles here:
" Refer to |:NeoBundle-examples|.
" Note: You don't set neobundle setting in .gvimrc!
NeoBundle 'Shougo/vimproc.vim', {
\ 'build' : {
\ 'windows' : 'make -f make_mingw32.mak',
\ 'cygwin' : 'make -f make_cygwin.mak',
\ 'mac' : 'make -f make_mac.mak',
\ 'unix' : 'make -f make_unix.mak',
\ },
\}
NeoBundle 'Shougo/unite.vim' "{{{
let bundle = neobundle#get('unite.vim')
function! bundle.hooks.on_source(bundle)
call unite#filters#matcher_default#use(['matcher_fuzzy'])
call unite#filters#sorter_default#use(['sorter_rank'])
call unite#custom#profile('files', 'context.smartcase', 1)
call unite#custom#source('line,outline','matchers',['matcher_fuzzy'])
set wildignore=*.o,*.obj,*.la,*.lo,*.so,*.pyc,*.pyo,*.jpg,*.png,*.gif
call unite#custom#source('file_rec/git', 'ignore_globs',
\ split(&wildignore, ','))
let dot = '\%(^\|/\)\.'
let dirs = '\%(^\|/\)\%(' . join(
\ ['node_modules', 'bower_components', 'dist'], '\|')
\ . '\)\%($\|/\)'
let files = join(['\.pyc\%($\)'], '\|')
let pattern = join([dot, dirs, files], '\|')
call unite#custom#source('file_rec/git', 'ignore_pattern', pattern)
endfunction
let g:unite_data_directory='~/.vim/.cache/unite'
let g:unite_enable_start_insert=1
let g:unite_source_history_yank_enable=1
let g:unite_source_rec_max_cache_files=5000
if executable('ag')
let g:unite_source_grep_command='ag'
let g:unite_source_grep_default_opts ='--nocolor --nogroup' .
\' --ignore "node_modules"' .
\' --ignore "bower_components"'
let g:unite_source_grep_recursive_opt=''
endif
function! s:unite_settings()
nmap <buffer> Q <plug>(unite_exit)
nmap <buffer> <esc> <plug>(unite_exit)
imap <buffer> <esc> <plug>(unite_exit)
endfunction
autocmd FileType unite call s:unite_settings()
nmap <space> [unite]
nnoremap [unite] <nop>
" current dir(c: current dir)
nnoremap <silent> [unite]c :<C-u>UniteWithCurrentDir -buffer-name=files -no-split
\ file_point buffer bookmark file_rec/git file/new<CR>
" buffer dir(b: buffer dir)
nnoremap <silent> [unite]b :<C-u>UniteWithBufferDir -buffer-name=files -no-split
\ file_point buffer bookmark file_rec/git file/new<CR>
" fuzzy find bookmark/file/buffer(f: find)
nnoremap <silent> [unite]f :<C-u>Unite -buffer-name=files -no-split
\ file_point buffer bookmark file_rec/git file/new<CR>
call neobundle#end()
" Required:
filetype plugin indent on
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck |
disaster after I move
But, now the ignore works :-) I have the following between
|
after I move the following lines after
But it's ugly, because I want theme related config to sit together. I've tried to invoke an additional |
You should use force. NeoBundle 'altercation/vim-colors-solarized', {'force':1} |
works, thanks for your warm help! |
file_rec/git does not respect ignore_pattern and ignore_globs
file that in
git ls-files
but ignored by "ignore_pattern" or "ignore_globs" should be ignored.The text was updated successfully, but these errors were encountered: