Sublime Forum

Visualize .gitattributes entries

#1

I really like how Sublime reads any .gitignore file and darkens the filenames of ignored files it matches. Could we get similar functionality for .gitattributes? It would be pretty useful to be able to easily see what would appear in the final zip of my GitHub tag.

Since the export-ignore keyword is colored in orange by the syntax highlighting for .gitattributes, I guess that attribute files can be colored in some orange tint.

0 Likes

#2

.gitattributes files have a lot more facets than a gitignore. I would find it hard to determine how an attribute should be visualized, considered how there are multiple and these may take multiple values, even. Or do you just want to match whether a file is being matched by gitattributes at all? In that case I would suggest using the git cli.

0 Likes

#3

I think that would be enough. Visualizing different states would be confusing. However, visualizing that there is a state at all will be both easier to comprehend and helpful enough.

0 Likes

#4

I don’t exactly forsee this becoming a priority considering how this is quite a niche application. If, however, a sidebar API was added that would allow for a plugin to do the necessary work and highlight files where appropriate (maybe even with extensive user configuration options), then this would certainly be possible.

For now, I suggest sticking to git check-attr.

1 Like