Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

clion: exclude files from project view

Tags:

clion

My Project View in CLion lists not only C++ files and headers but also built libraries (.la) and object files (.o). I don't want to see them. What can I do to make them not appear in the list?

like image 386
rwst Avatar asked May 14 '15 12:05

rwst


3 Answers

In the menu go to Files/Settings: in the dialog box chose the item File types. The last field in the dialog is Ignored files and folders. It contains semicolon-separated patterns that will be applied and, if the file matches one of these, ignored. Wildcards like * are allowed.

So just add ;*.la;*.o at the end.

like image 158
rwst Avatar answered Sep 18 '22 20:09

rwst


You can also define a so-called "Scope" by clicking on the gear icon at the right of the project view's header bar -> "Edit scopes". This will present you with a nice ui to define your filter. Afterwards, click on the triangle next to "Project" in the project view header bar and select your newly created scope.

like image 37
suluke Avatar answered Sep 21 '22 20:09

suluke


If you are using version control(git) you can also add the file extensions to the .gitignore file and Clion should hide those files as well. If you're not using version control then adding the file extensions to the Clion Ignored files and folders list.

like image 25
Thomas Steinholz Avatar answered Sep 20 '22 20:09

Thomas Steinholz