Git Product home page Git Product logo

exclude-indexing-filetree's Introduction

Brackets File Tree Exclude

Brackets extension for excluding folders and files from the file tree, find in files, and quick open.

This means that the files will be completely invisible to Brackets what will greatly improve overall performance of the editor.

This is great for cache folders, distribution/build folders and files, and package manager folders like node_modules and bower_components.

Based on works of:

How to install

Install via the Brackets extension manager.

Use brackets-npm-registry

Configure

Exclusions are defined globally by default inside the Brackets preferences file (Debug > Open preferences file).

Append or edit your configuration options there. (See below for example of defaults)

Or on a per project basis:

Create a .brackets.json in project root (it may already exist) and add your settings there.

Note

Project config completely redefine exclusion rules from global config.

Configuration defaults

{
    "dimitrk.exclude-indexing-filetree.excludeList": [
        ".git(?!ignore)",
        "dist",
        "bower_components",
        "node_modules"
    ]
}

How it Matches

It tries to parse simple folder paths on your project's .gitignore file beside any regular expressions found on config. As opposed with the config file, any wildcard expressions found on .gitignore will be not interpreted as such due to the different natures of .gitignore expressions and JavaScript RegExps.

It takes the excludeList array (either the default or if .brackets.json file exists in the project root) and turns each string into a regular expression. So if a string is "node_modules" then it will turn it into new RegExp("node_modules"). You can specify expressions as strings also. So if a string is "/foo/i", then it will turn it into new RegExp("foo", "i").

The resulting expressions are then matched against the realtive path fo the file in the tree.

exclude-indexing-filetree's People

Contributors

dimitrk avatar jeffda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

exclude-indexing-filetree's Issues

file vs folder exclusion

Is there a way to differentiate between folders and files when excluding something?,

Adding "files" to the list of exclusions excludes the folder 'files' but also 'my_profiles.php'. I'd rather exclude just the folder, not all the files that might contain the 'files' match.

Thank you.

Specify some files not to hide

I love that it looks through an existing .gitignore file for files to exclude. It would be nice to have a feature that overrides what gitignore it excluding. I would like to be able to gitignore settings files, but keep them indexed in brackets.

Something like
"dimitrk.exclude-indexing-filetree.excludeList": [ "!mysettings.file" ]
where mysettings.file exists in .gitignore

[BUG] logitem.js gets hidden in folder

I had a file named logitem.js, this was not located in the excluded folders. However it did not show up in the folder. If I disable the extension or rename it like log-item.js it does show up.

Hides all files

Hi,

I installed your extension, and added the .brackets.json file to the root of my current project, with the following content:

{
"dimitrk.exclude-indexing-filetree.excludeList": [
"node_modules"
]
}

I'm using in addtion the "Projects" extension.
When I restart brackets, all files will dissappear in the project folder within this extension.

Cheers,
Alex

.gitignore lines starting with "/" don't work

I have a .gitignore like:

/bin
/include
/lib

__pycache__
.Python

pip-selfcheck.json
pyvenv.cfg

The /bin, /include and /lib lines seem to be completely ignored. Removing the starting slash fixes it, but those lines are specific like that for a reason..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.