Sublime Forum

Find in all files + minified = hard to use

#1

I have a lot of minified javascript without the originals (they are generated elsewhere in a shared config blah blah blah)

The problem is that when I do a “Find in all files…” each hit takes up about 15 pages of scrolling. I wish I could just ignore these files, but I can’t because sometimes I am looking for the values in the minified files.

Even with “show context” turned off, these single line files clutter my search results to the point they it is almost unusable. Is there a way to clip the text after X number of characters instead of X number of lines?

1 Like

#2

Could you just turn off word wrap? That’ll clip the text.

0 Likes

#3

You can use the exclude filter when Finding in Files. Just add -filename.js and it won’t search that file.

0 Likes

#4

Good point. Slight annoyance as I do usually have word wrap turned on.

0 Likes

#5

Maybe you could use a syntax-specific settings file to just turn it off in the Find Results? Or just turn it on in js files?

0 Likes

#6

@oreoshake your solution does work but one has to set the config

  "word_wrap": false

which looses the benefits of having the default auto value, which does wrap for non-code files.

A rule to excluse file like *.min.js doesn’t work in every case neither, as there are situations where one doesn’t control the file name.

IMHO the only solution is that there should be an option to exclude minified files, either based on line length, or something like file “compactness”.

This is serious UX issue.

0 Likes