Sublime Forum

How include a file from a excluded folder in my .sublime-project?

#1

I am trying to exclude everything from the folder Local, but only keep the file Backstroke.gitmodules. I tried this combination, but it keeps ignoring all the files, and if I add "*" to file_include_patterns, it start accepting all the files.

{
    "folders":
    [
        {
            "path": ".",
            "folder_exclude_patterns":
            [
                "Cache",
                "Index",
                "Lib",
            ],
            "file_include_patterns":
            [
                "Local/Backstroke.gitmodules",
            ],
        },
    ]
}

Related threads:

  1. *.sublime-project: folder_exclude_patterns
  2. How to exclude some JSON files with file_exclude_patterns in my sublime-project?
0 Likes

#2

I figured out doing this including all the folders and file I need on file_include_patterns and excluding all the folder and files I do not need to folder_exclude_patterns and file_exclude_patterns:

{
    "folders":
    [
        // { "path": ".", },
        {
            "path": ".",
            "file_include_patterns":
            [
                "Local/Backstroke.gitmodules",
                "Packages/*",
                ".gitignore",
                "LICENSE",
                "README.MD",
            ],
            "folder_exclude_patterns":
            [
                "Cache",
                "Index",
                "Packages/User/Color Highlighter",
            ],
            "file_exclude_patterns":
            [
                "Packages/User/FileHistory*.json",
            ],
        },
    ]
}
1 Like