Question

on kdevelop, you can configure a file filter ( on top of project tree ). Normally, the project tree shows a lot of files with different extensions, e.g xy.conf, xy.prf, moc_xy.cpp, moc_xy.h and so on. I want hide all unnessary files with following regex: [^\moc][a-z]*\.(h|cpp). But if I use this regex, it shows me no files. Whats wrong with this regex?

I also, read this post but the answer: \.(h|c(pp)?)$ doesn't work.

Best regards, Chris

Was it helpful?

Solution

You can only show *.h/c/cpp files in your project by first excluding all files * and then adding these inclusive patterns for them.

Like this, e.g. add this to your .gitignore/.hgignore file:

*
!*.h
!*.c
!*.cpp

If you don't have such filter files, you can configure them in the kdevelop's project fileter by adding includes and excludes:

enter image description here

OTHER TIPS

try this:

.(h|c(pp)?)$

it works when i tested it here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top