Thanks for @Kev.
Instead of Marty Grenfell nerdtree
The latter one doesn't support [[file]]
magic flag
"let NERDTreeIgnore = ['^\(.*\.\(cpp\|h\)$\)\@!.*[[file]]']
let NERDTreeIgnore = ['\(\.cpp\|\.h\)\@<!$[[file]]']
Both expresstions work.
You can type: :help pattern.txt
and search /@!
to see regex syntax detail.
Or there are 2 great links:
regular-expressions look around
Regular expression to match a line that doesn't contain a word?