Sublime Forum

Missed opportunity with "index_exclude_patterns"

#1

It is extremely frustrating that this doesn’t use normal globs. Internally you’re globbing (or similar) to get all the files and read them, so why not just expand the glob and filter based on that? It’s useful to be able to look at build code or library code without having to index it, and since so much Sublime Text workflow revolves around projects, it’s silly that this isn’t supported.

This should be supported globally or in .sublime-project files as:

{
  // Settings syntax
  "settings": {
    "index_exclude_patterns": 
      "node_modules/**/*", // All the things in node_modules
      "dist/*.js",         // Leave base js files alone
      "dist/**/*.js"       // Or Leave all js files in dist alone
    ]
  },
  // Folders syntax equivelant
  "folders": 
    {
      "name": "Base",
      "path": ".",
      "index_exclude_patterns": "node_modules/**/*"],
    },
    {
      "name": "Dist",
      "path": "dist",
      "index_exclude_patterns": "**/*.js"]
    }
  ]
}

Please consider implementing this, as projects and indexing are very nice features, but not having better control of indexing requires an unfortunate trade off to be made (disable indexing or exclude files that you’d otherwise like to see, but not index).

Thanks for your consideration.

3 Likes

#2

Bump. Anyone interested?

0 Likes

#3

Bump, this is an obvious win.

0 Likes