Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text: common "folder_exclude_patterns" for all folder paths in a project

How can we set common "folder_exclude_patterns" for all folder paths in a project.

For example, in the following project configuration, the folder_exclude_patterns has to be repeated for each of the folder path. Can we have it at a common single place in the configuration, instead of specifying under each of the path setting?

{
"folders":
[
    {
        "follow_symlinks": true,
        "path": "/path/to/folder/1",
        "folder_exclude_patterns": ["node_modules", "target", ".sass-cache"]

    },
    {
        "follow_symlinks": true,
        "path": "/path/to/folder/2",
        "folder_exclude_patterns": ["node_modules", "target", ".sass-cache"]
    },
    {
        "follow_symlinks": true,
        "path": "/path/to/folder/3",
        "folder_exclude_patterns": ["node_modules", "target", ".sass-cache"]
    }
]
}
like image 981
Vijey Avatar asked Aug 01 '14 07:08

Vijey


People also ask

How do I open multiple folders in Sublime Text?

Yes it's possible to have multiple folders in the the project sidebar. There are a few different ways to add more folders. You can try dragging folders directly onto the sidebar. Or you can go to Project > Add Folder to Project (from the menu).

How do I search all files in Sublime Text?

Use the Search all shortcut: Ctrl + Shift + F , then select the folder in the "Where:" box below. (And for Mac, it's ⌘ + Shift + F ).


1 Answers

You are making adjustment in Project settings. Use User settings instead.

Probably this is what you trying to do:

Go to

Preferences > settings

Look at "folder_exclude_patterns" property below I added "node_modules" to hide those folders from sublime you can go ahead and also add "target" and ".sass-cache" folders to hide them.

{
    "binary_file_patterns":
    [
        "*.dds",
        "*.eot",
        "*.gif",
        "*.ico",
        "*.jar",
        "*.jpeg",
        "*.jpg",
        "*.pdf",
        "*.png",
        "*.swf",
        "*.tga",
        "*.ttf",
        "*.zip",
        "node_modules/**"
    ],
    "color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
    "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"
    ],
    "folder_exclude_patterns":
    [
        "*.phpintel",
        ".svn",
        ".git",
        ".hg",
        "CVS",
        "node_modules",
    ],
    "font_size": 12,
    "ignored_packages":
    [
        "Vintage"
    ],
    "ignored_words":
    [
        "autoload",
        "config",
        "php"
    ],
    "show_encoding": true,
    "spell_check": false,
    "tab_size": 2,
    "translate_tabs_to_spaces": true,
    "word_wrap": false
}
like image 143
DevWL Avatar answered Sep 24 '22 05:09

DevWL