Home Download Buy Blog Forum Support

Find Results in compressed JavaScript shows the entire file

Find Results in compressed JavaScript shows the entire file

Postby Les on Wed Dec 21, 2011 5:36 pm

I noticed that Find Results in a compressed JavaScript file (single line) shows the entire file.

It's rather annoying to scroll through as the compressed JS files tend to be very large.

Is this a bug or a feature? Is it possible not to show the entire JS file?
Les
 
Posts: 23
Joined: Tue Oct 11, 2011 4:12 pm

Re: Find Results in compressed JavaScript shows the entire file

Postby facelessuser on Wed Dec 21, 2011 5:42 pm

Probably not a bug, but a feature. Find shows what line the target was found on. Since compressed Javascript compresses to one line...you get the idea.

If Find was configured to only show up until the target, you would not get the context in which the result is found. How far should you show until you truncate? In normal coding practices, showing the entire line is more than acceptable, a matter a fact, I would say required. Not many people are searching compressed Javascript, they are searching the original source because people don't usually modify compressed Javascript; compressed Javascript is the final release state.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: Find Results in compressed JavaScript shows the entire file

Postby Les on Wed Dec 21, 2011 5:59 pm

>>> Not many people are searching compressed Javascript, they are searching the original source...

Well... how do I exclude the compressed JS files? I have an application with several thousand small JavaScript files and a small number of large compressed JS files... Id' like to exclude the compressed files from my searches, but this is not possible.
Les
 
Posts: 23
Joined: Tue Oct 11, 2011 4:12 pm

Re: Find Results in compressed JavaScript shows the entire file

Postby facelessuser on Wed Dec 21, 2011 6:21 pm

Ideally, you would export your compressed code somewhere separate from your source code, and probably even give some specifier to let you know it is compressed (source.js => source-min.js). Then, when you search folders you can add an exclude filter

example of path to search, files to search, and files to exclude (min.js)
Code: Select all
c:\somepath\folder\blah,*.js,*.css,-*min.js


I am not sure if you can exclude certain folders with the exclude filter, you would have to play around with it; I haven't tried to define folders in an exclude filter yet, but it might work, but I know you can define wildcards for file names.

I think you might be able to exclude certain folders from a project in general (I have never tried to do this), those exclusions may get picked up my Find (if you can even do this); I don't know though. Maybe some others can chime in here.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: Find Results in compressed JavaScript shows the entire file

Postby aparajita on Fri Dec 23, 2011 2:32 am

You can exclude files in the project settings:

http://www.sublimetext.com/docs/2/projects.html
aparajita
 
Posts: 177
Joined: Sun Jul 24, 2011 10:42 pm


Return to General Discussion

Who is online

Users browsing this forum: TheBlackDragon and 20 guests