kien/ctrlp.vim — Issue #146: g:ctrlp_custom_ignore and hidden files/folders
Author: obxhdx
Created: 2012-02-23 00:59:35+00:00
State: open

I took a look at the related issues and none of them seemed to help.
Basically, I want to ignore hidden files and folders (e.g.: `.foo`). Therefore I'm doing the following:

let g:ctrlp_custom_ignore = {
\ 'dir': '\..\+$',
\ 'file': '\..\+$',
\ 'link': '\..\+$',
\ }

However, it has a side effect. Files like `foo.php` are also ignored. I couldn't manage to set it to ignore only matches with a leading `.`. If I add a `^` at the start of the pattern, it can't match anything, and as a result all (unwanted) hidden files start to appear again.