happypeter / peter-vim

My ~/.vim/
45 stars 26 forks source link

ctrl-p ignore node_modules #7

Open happypeter opened 9 years ago

happypeter commented 9 years ago

vimrc 中添加下面的就行:

"let g:ctrlp_custom_ignore = $PWD.'/\(\.git\|node_modules\)$'
let g:ctrlp_custom_ignore = $PWD.'/\(node_modules\)$'
happypeter commented 9 years ago

但是还不知道跟已有的

let g:ctrlp_custom_ignore = {
  \ 'dir':  '\v[\/]\.(git)$',
  \ 'file': '\v\.(log|jpg|png|jpeg)$',
  \ }

这些合并到一起。

happypeter commented 9 years ago

下面这样是可以的

let g:ctrlp_custom_ignore = {
  \ 'dir':  '/\(\.git\|node_modules\)$',
  \ 'file': '\v\.(log|jpg|png|jpeg)$',
  \ }
happypeter commented 9 years ago

.git 似乎是默认 ignore 的,加不加都行