How to show .gitignore file in the sidebar in Sublime Text 2/3

2

I want to see my project .gitignore file. It's always hidden. Why it's hidden and how to fix this?

ValeriiVasin

Posted 2013-07-23T13:08:03.853

Reputation: 423

Files with names starting with a dot are hidden on Unix-like systems. You can switch between files in ST by pressing Ctrl+P and typing filename, it's faster than using a sidebar and .gitignore is visible there. You don't have to type entire name, ST is using fuzzy search. – gronostaj – 2013-07-23T13:11:21.493

Answers

5

In Unix, as @gronostaj said, files proceeded with a . are hidden by default (Ctrl+h toggles this in many environments). However, in Sublime - you can manually control what types of files are shown/hidden separate from what the system default is.

For you to change your settings you need to adjust your User Preferences file with the following:

{
    "folder_exclude_patterns": [".svn", ".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", "*.sublime-workspace"]
}

Add/remove as necessary from there.

On Mac, your preferences are under Sublime Text > Preference > Settings - User. I don't recall the menu structure on my windows box, but it's probably under Tools.

For me:

enter image description here

nerdwaller

Posted 2013-07-23T13:08:03.853

Reputation: 13 366