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

7,714

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

Share:
7,714

Related videos on Youtube

ValeriiVasin
Author by

ValeriiVasin

Updated on September 18, 2022

Comments

  • ValeriiVasin
    ValeriiVasin over 1 year

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

    • gronostaj
      gronostaj almost 11 years
      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.