30. Indexing

Sublime Text indexing is almost completely self contained—sort of like “set it and forget it”, since it works so well.

One of the brilliant little tricks is its ability to honor this Sublime Text settings:

index_exclude_gitignore:  true

Normally how this works is quite intuitive: when Sublime Text detects a .gitignore file in a folder that is part of the FOLDERS tree in the Side Bar, any files now ignored by git are now also ignored by Sublime Text, and the transition is nearly instant.

There is one case however, that can be a bit tricky: this works SO LONG as the files involved ARE NOT ALREADY PART OF THE git REPOSITORY! If they are part of the git repository, Sublime Text silently fails to honor the .gitignore file and will stubbornly continue to index the files in the targeted directory(ies) that are included by the .gitignore file. This happens because Sublime Text only honors this arrangement when the files are not in the local git repository. To remedy (if you got yourself into this situation), do a git rm for the files involved (beware, this deletes the files, so save a copy elsewhere if you need to keep them, but simply make them “untracked” in the git repository), and Sublime Text will suddenly honor the .gitignore file in question again.

Todo

fill in