Home Download Buy Blog Forum Support

general question about the Find command

general question about the Find command

Postby RwwL on Wed Oct 19, 2011 3:02 pm

I'm wondering if there's a setting/preference I haven't found yet that would allow me to change the behavior of Cmd+F.

In ST2, Cmd+F acts as a toggle for the Find UI. In most other editors I've used, when the FInd UI is already open, Cmd+F doesn't hide Find, it re-focuses it and selects the entire value so you can overtype and begin searching for something else. This is the default behavior in TextMate and Coda, for example.

So, in ST2, I frequently invoke find, type something, hit cmd+F again, expecting to search for another term, but I've actually hidden Find and now I'm screwing up my file..

I found this in the default .sublime.keymap...

{ "keys": ["super+f"], "command": "show_panel", "args": {"panel": "find"} },

...but I'm not sure how I can tweak that to get what I want. I'll go look on the wiki now, but thought I'd ask here first in case it's quicker. Thanks.
RwwL
 
Posts: 7
Joined: Wed Oct 19, 2011 2:52 pm

Re: general question about the Find command

Postby guillermooo on Wed Oct 19, 2011 4:05 pm

I don't know if the "toggle" parameter works for all panels, but you can try:

Code: Select all
{ "keys": ["ctrl+backquote"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
guillermooo
 
Posts: 718
Joined: Thu Jul 23, 2009 9:06 am

Re: general question about the Find command

Postby RwwL on Wed Oct 19, 2011 4:15 pm

Thanks. Doesn't work for find, apparently.
RwwL
 
Posts: 7
Joined: Wed Oct 19, 2011 2:52 pm

Re: general question about the Find command

Postby adzenith on Wed Oct 19, 2011 4:37 pm

Wait, don't you want it to *not* toggle? What happens if you set toggle to false?
I'd try it but apparently when I press cmd+f the find panel does exactly what you want: it refocuses. Not sure what I'm doing different.
adzenith
 
Posts: 1204
Joined: Mon Oct 19, 2009 9:12 pm

Re: general question about the Find command

Postby RwwL on Wed Oct 19, 2011 4:54 pm

I actually tried both true and false.
RwwL
 
Posts: 7
Joined: Wed Oct 19, 2011 2:52 pm

Re: general question about the Find command

Postby RwwL on Wed Oct 19, 2011 4:56 pm

adzenith wrote:Wait, don't you want it to *not* toggle? What happens if you set toggle to false?
I'd try it but apparently when I press cmd+f the find panel does exactly what you want: it refocuses. Not sure what I'm doing different.


Build 2126?
RwwL
 
Posts: 7
Joined: Wed Oct 19, 2011 2:52 pm

Re: general question about the Find command

Postby guillermooo on Wed Oct 19, 2011 5:51 pm

True, dev build 2133 works as you describe.
guillermooo
 
Posts: 718
Joined: Thu Jul 23, 2009 9:06 am

Re: general question about the Find command

Postby adzenith on Wed Oct 19, 2011 6:29 pm

Ah, that must be it then. I can't resist those cutting-edge dev builds!
adzenith
 
Posts: 1204
Joined: Mon Oct 19, 2009 9:12 pm

Re: general question about the Find command

Postby Cottser on Fri Oct 21, 2011 2:23 pm

Not sure exactly which build this was introduced in. The behaviour in 2133 is much improved, but still not quite there for me.

I'd like to be able to hit Cmd-F, type an initial string, Cmd-F, type another string. Currently the second string is just typed after the first string because the initial string is not selected with the second press of Cmd-F.

It works fine if you hit Cmd-F, do something in the buffer, then hit Cmd-F again, but not very well for multiple quick searches.
Cottser
 
Posts: 22
Joined: Sat Oct 08, 2011 12:24 am

Re: general question about the Find command

Postby adzenith on Fri Oct 21, 2011 5:27 pm

Cottser wrote:I'd like to be able to hit Cmd-F, type an initial string, Cmd-F, type another string. Currently the second string is just typed after the first string because the initial string is not selected with the second press of Cmd-F.


I'd like this too.
adzenith
 
Posts: 1204
Joined: Mon Oct 19, 2009 9:12 pm

Next

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 7 guests

cron