# Exclude directory from Go To Anything

**URL:** <https://forum.sublimetext.com/t/exclude-directory-from-go-to-anything/5767>\
**Category:** General Discussion\
**Created:** [May 30, 2012, 11:41pm UTC](https://forum.sublimetext.com/t/exclude-directory-from-go-to-anything/5767 "2012-05-30T23:41:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![shatrov](https://forum.sublimetext.com/user_avatar/forum.sublimetext.com/shatrov/32/67874_2.png) [@shatrov](https://forum.sublimetext.com/u/shatrov)\
**Post date:** [May 30, 2012, 11:41pm UTC](https://forum.sublimetext.com/t/exclude-directory-from-go-to-anything/5767/1 "2012-05-30T23:41:10Z")

</div>

Hello,

I use Go To Anything (Cmd+P) many times every day, but there are some system directories in my project. Is it possible to exclude several dirs from “Go To Anything”?

---

<div class="post-metadata">

**Author:** ![C0D312](https://forum.sublimetext.com/user_avatar/forum.sublimetext.com/c0d312/32/64583_2.png) [@C0D312](https://forum.sublimetext.com/u/C0D312)\
**Post date:** [May 31, 2012, 1:04am UTC](https://forum.sublimetext.com/t/exclude-directory-from-go-to-anything/5767/2 "2012-05-31T01:04:45Z")

</div>

From Preferences \> Settings - Default:

[pre=#2A2A2A] // folder\_exclude\_patterns and file\_exclude\_patterns control which files  
// are listed in folders on the side bar. These can also be set on a per-  
// project basis.  
“folder\_exclude\_patterns”: “.svn”, “.git”, “.hg”, “CVS”],  
“file\_exclude\_patterns”: “_.pyc", "_.pyo”, “_.exe", "_.dll”, “_.obj","_.o”, “_.a", "_.lib”, “_.so", "_.dylib”, “_.ncb", "_.sdf”, “_.suo", "_.pdb”, “_.idb", “.DS\_Store”, "_.class”, “_.psd", "_.db”],  
// These files will still show up in the side bar, but won’t be included in  
// Goto Anything or Find in Files  
“binary\_file\_patterns”: “_.jpg", "_.jpeg”, “_.png", "_.gif”, “_.ttf", "_.tga”, “_.dds", "_.ico”, “_.eot", "_.pdf”, “_.swf", "_.jar”, “\*.zip”],[/pre]

To override this, add it to Preferences \> Settings - User.

---

<div class="post-metadata">

**Author:** ![stirrell](https://forum.sublimetext.com/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@stirrell](https://forum.sublimetext.com/u/stirrell)\
**Post date:** [June 1, 2012, 12:33am UTC](https://forum.sublimetext.com/t/exclude-directory-from-go-to-anything/5767/3 "2012-06-01T00:33:12Z")

</div>

This tip came in handy for me. I use the CTAGs package and was tired of getting results from .tags and .tags\_sorted\_by\_file in my results. I added both of these files in my default settings exclude filter and solved it for all my project-wide searches. Thanks for the help!

---

<div class="post-metadata">

**Author:** ![vitaLee](https://forum.sublimetext.com/user_avatar/forum.sublimetext.com/vitalee/32/32941_2.png) [@vitaLee](https://forum.sublimetext.com/u/vitaLee)\
**Post date:** [August 29, 2012, 4:28pm UTC](https://forum.sublimetext.com/t/exclude-directory-from-go-to-anything/5767/4 "2012-08-29T16:28:29Z")

</div>

is “binary\_file\_patterns” supposed to work on a per project basis?  
im trying this

```auto
{
	"folders":
	
		{
			"path": "/Users/vitalee/Projects/Test",
      "binary_file_patterns": "config/*.rb"]
		}
	]
}

```

i expected all .rb files in config to be filtered from goto list but they’re not.  
shed some light please.

---

<div class="post-metadata">

**Author:** ![Jay\_Levitt](https://forum.sublimetext.com/letter_avatar_proxy/v4/letter/j/85e7bf/32.png) [@Jay\_Levitt](https://forum.sublimetext.com/u/Jay_Levitt)\
**Post date:** [August 30, 2012, 3:00pm UTC](https://forum.sublimetext.com/t/exclude-directory-from-go-to-anything/5767/5 "2012-08-30T15:00:58Z")

</div>

I would bet that “binary\_file\_patterns” is only applied to the filename portion, not the path, so you can’t use “config/\*.rb” as a pattern. I’d love to be wrong or to hear another way, though; I have a similar problem, system directories that I want to be able to browse but that I don’t want to appear in Go To Anything.

---

<div class="post-metadata">

**Author:** ![vitaLee](https://forum.sublimetext.com/user_avatar/forum.sublimetext.com/vitalee/32/32941_2.png) [@vitaLee](https://forum.sublimetext.com/u/vitaLee)\
**Post date:** [August 30, 2012, 8:03pm UTC](https://forum.sublimetext.com/t/exclude-directory-from-go-to-anything/5767/6 "2012-08-30T20:03:57Z")

</div>

Don’t bet much, because it works as expected when pattern is added in global or user settings file. 😄  
it’s just ignored on a project level.  
created a topic on userecho [http://sublimetext.userecho.com/topic/124477-binary\_file\_patterns-in-project-settings-doesnt-work/](http://sublimetext.userecho.com/topic/124477-binary_file_patterns-in-project-settings-doesnt-work/)  
go and vote if you care

---

<div class="post-metadata">

**Author:** ![eighteyes](https://forum.sublimetext.com/user_avatar/forum.sublimetext.com/eighteyes/32/65377_2.png) [@eighteyes](https://forum.sublimetext.com/u/eighteyes)\
**Post date:** [February 13, 2014, 4:56pm UTC](https://forum.sublimetext.com/t/exclude-directory-from-go-to-anything/5767/7 "2014-02-13T16:56:00Z")

</div>

I wanted to add that this removes the matching files / folders from your whole project, not just from the search.

I can see a solid use case for wanting to remove something from the search, to make it easier to find things in lists, and not wanting to hide it from the project entirely.

---

<div class="post-metadata">

**Author:** ![Jespertheend](https://forum.sublimetext.com/user_avatar/forum.sublimetext.com/jespertheend/32/69911_2.png) [@Jespertheend](https://forum.sublimetext.com/u/Jespertheend)\
**Post date:** [January 7, 2017, 4:02pm UTC](https://forum.sublimetext.com/t/exclude-directory-from-go-to-anything/5767/8 "2017-01-07T16:02:00Z")

</div>

Any updates on this? I like the new definitions feature but it lists all my backups as well.

---

<div class="post-metadata">

**Author:** ![ctf0](https://forum.sublimetext.com/user_avatar/forum.sublimetext.com/ctf0/32/53097_2.png) [@ctf0](https://forum.sublimetext.com/u/ctf0)\
**Post date:** [August 17, 2017, 5:43pm UTC](https://forum.sublimetext.com/t/exclude-directory-from-go-to-anything/5767/9 "2017-08-17T17:43:26Z")

</div>

any news on this ?

having the same option to **ignore folders from the sidebar** & also **ignore from the go-to** is dump.
