我想忽略ctrlp.vimdist
的.git
目录。我的配置如下:.vimrc
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/](\.git|dist)$'
}
我有两个问题:
- 它不会忽略
dist
目录。 - 声明中的
\v
意思是什么?
PS:这是我的ctrlp配置.vimrc
""" ctrlp
let g:ctrlp_use_caching = 1
let g:ctrlp_clear_cache_on_exit = 0
let g:ctrlp_cache_dir = '$HOME/.vim/cache/ctrlp'
let g:ctrlp_max_files = 1000
let g:ctrlp_max_history = &history
let g:ctrlp_max_depth = 10
let g:ctrlp_user_command = [
\ '.git', 'cd %s && git ls-files . -co --exclude-standard',
\ 'rg %s --files --color=never --glob ""',
\ 'find %s -type f'
\ ]
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/](\.git\|dist)$',
\ 'file': '\v\.(exe|so|dll)$',
\ }
"let g:ctrlp_custom_ignore = 'dist'
" let g:ctrlp_user_command = ['rg --files']
let g:ctrlp_working_path_mode = 'ra'
let g:ctrlp_reuse_window = 'startify'
map ff :CtrlP<cr>