Home Download Buy Blog Forum Support

How to find all in current file?

How to find all in current file?

Postby hileon on Tue Apr 17, 2012 4:04 am

I think find all is very useful. The search result list is very helpful.

But I don't how to do a find all in current file. I am not meaning to loop in current file, but list the search results.
Now I can only do this by typing current file's filename in "where" bar, and do a find all. But it require really too much types. Is there a shortcut for current file?
hileon
 
Posts: 2
Joined: Thu Apr 12, 2012 4:52 am

Re: How to find all in current file?

Postby phillip.koebbe on Tue Apr 17, 2012 11:39 am

How are you invoking the find panel? Are you using SHIFT+SUPER+F? If so, that's Find in Files. Try just SUPER+F, which is simply Find and will work in the current view. Or you can use the Find menu.
-- Phillip

Code: Select all
while self.living? do
    mistake = Mistake.new
    self.learn_from!(mistake) unless mistake.fatal?
end
phillip.koebbe
 
Posts: 208
Joined: Tue Dec 20, 2011 4:58 pm

Re: How to find all in current file?

Postby SeanWcom on Tue Apr 17, 2012 1:10 pm

I think he's looking to have a list created like Find in Files does. When you do a find all using the CTRL-F find, it just highlights them. I can see how a list would be beneficial in a very large file, but I don't know that it's possible out of the box. The only thing I can think of off the top of my head is to do a find in files, and change the option to "all open files" and only have the one file open. Lame solution I know, but if you MUST have a list, that's one way. :)
Multiple selections... one of my favorite ST2 features. View some noob-friendly screen casts here.
SeanWcom
 
Posts: 101
Joined: Wed Aug 03, 2011 1:31 am
Location: Georgia

Re: How to find all in current file?

Postby phillip.koebbe on Tue Apr 17, 2012 1:43 pm

Oh, I see. I use ack on the command line for searching through multiple files and had not yet encountered the find all list. I can see how that might be useful.

Sorry for the misunderstanding/noise.
-- Phillip

Code: Select all
while self.living? do
    mistake = Mistake.new
    self.learn_from!(mistake) unless mistake.fatal?
end
phillip.koebbe
 
Posts: 208
Joined: Tue Dec 20, 2011 4:58 pm

Re: How to find all in current file?

Postby cjr on Thu May 03, 2012 11:29 am

+1

This is a very nice feature that does not force you to go through each instance in the current file. Is there an easy way to do a plugin to accomplish this?
cjr
 
Posts: 3
Joined: Thu May 03, 2012 11:23 am

Re: How to find all in current file?

Postby phillip.koebbe on Thu May 03, 2012 1:22 pm

phillip.koebbe wrote:Oh, I see. I use ack on the command line for searching through multiple files and had not yet encountered the find all list. I can see how that might be useful.


Just wanted to say that I've been using the Find in Files feature in ST2 and I like it. It's nice to be able to see a few lines of context around the hits (that's what I miss in ack) and being able to double click to go to the file *and* line is very nice. Quite speedy, too. Very impressive.
-- Phillip

Code: Select all
while self.living? do
    mistake = Mistake.new
    self.learn_from!(mistake) unless mistake.fatal?
end
phillip.koebbe
 
Posts: 208
Joined: Tue Dec 20, 2011 4:58 pm

Re: How to find all in current file?

Postby cjr on Tue May 08, 2012 12:24 pm

I like this feature as well, but would like a way to search the current file. I think this should be possible with either a binding or a plugin.

for the current hotkey, it is setup as:
{ "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },

when the "find_in_files" panel comes up, is there a way I can send as an argument the value for "Where" and send it the current file name? this would accomplish what I am looking for but am not sure how to do this. The "Find" value is already loaded with the currently selected word.
cjr
 
Posts: 3
Joined: Thu May 03, 2012 11:23 am


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 33 guests