Sublime Forum

Close find, replace... panels

#1

Hi,

I think it’s a very newbie question but it’s driving me nuts. :astonished: I am using Sublime on Mac. I use CMD+F to open the find panels, but I can’t close them. Nothing seams to work. Any help?

Really amazing IDE, I am loving. Thanks

0 Likes

#2

Pressing esc doesn’t close it for you?

0 Likes

#3

So obvious! Thank you!

0 Likes

#4

If you don’t want to use the Esc key (i.e. if you have Vim bindings installed and if you aren’t focused on the Find it throws you into Command mode), it is easy to setup another keybind, to say Ctrl-Alt-f. Just add the following to your User/Default Keybindings file (Preferences->Key Bindings - User).

[code]{ “keys”: “ctrl+alt+f”], “command”: “hide_panel”, “args”: {“cancel”: true},
“context”:

  { "key": "panel_visible", "operator": "equal", "operand": true }
]

}[/code]

0 Likes

#5

@sgobin, I encountered the same issue as you. It is most definitely not obvious that pressing “esc” should close the Find & Replace panel. There’s an adage in user experience design that there are no dumb users, only dumb programs. I love Sublime Text, and I think you guys have executed incredibly well in the design of this app - aside from a few minor quirks - this being one of them.

What I tried to do to dismiss the Find panel was to hit “Cmd + F” again, expecting the same keyboard combo to toggle the panel back off. It’d be great if you could enable that. The “esc” approach is not intuitive, nor is it exposed anywhere in the menus or interface. Or, consider having an actual close button/icon in the Find & Replace panels so there’s zero ambiguity on how to close them. Just my two cents :smile:

0 Likes

#6

What program do you have where cmd+f toggles the search panel? CMD+f to show and escape to hide is the norm in Chrome, XCode, terminal, mail, etc.

0 Likes

#7

I agree, please add a close button to the find panel. Or an option to close/hide it.

Bob

0 Likes

#8

Of course you could use the above trick to effect a toggle for ctrl+f instead of binding to a separate key:

[code] { “keys”: “ctrl+f”], “command”: “show_panel”, “args”: {“panel”: “find”},
“context”:

      { "key": "panel_visible", "operator": "equal", "operand": false }
    ]
},
{ "keys": "ctrl+f"], "command": "hide_panel", "args": {"cancel": true},
    "context":
    
      { "key": "panel_visible", "operator": "equal", "operand": true }
    ]
}[/code]

The only thing is, the “close” part of the toggle won’t be able to differentiate panel types. So if you opened an i-search find with ctrl+i, ctrl+f would still close the panel with the above keybindings.

On the UI side, minimal UI chrome is Jon’s goal. Sometimes this comes at the expense of slight usability for newbies. Personally, I would favour a situation where “show_tab_close_buttons” config option would affect close button visibility system-wide, coupled with close buttons on panels. If the setting is true, we’d see close buttons on panels, sidebars etc, and if not we’d hide them.

S

0 Likes

#9

I’m thinking along the same lines as quarnster. I checked Pages, Numbers, TextMate, TextWrangler, TextEdit, Mail, Chrome, Safari, Firefox, Evernote, and OmniFocus, and the only one that toggled on CMD-F is Numbers. All of the others open a find dialog with CMD-F and it is dismissed with ESC. That behavior seems pretty common (approaching standard?), at least on a Mac (I can’t speak for the other platforms).

0 Likes

#10

While the toggle part is true (use escape instead of a repeated command-f), many (all?) of those programs also have a button to close the find panel.

Safari has a ‘done’ button.
Pages a standard window close red button.
Numbers a handle to drag the panel closed.
BBEdit (and so I assume TextWrangler, too) a standard window close red button.

Maybe a system-wide option for close buttons, as suggested here, would work to eliminate interface chrome for those who don’t like it while leaving an option for those who do.

0 Likes

#11

[quote=“bobrocke”]

While the toggle part is true (use escape instead of a repeated command-f), many (all?) of those programs also have a button to close the find panel.

Safari has a ‘done’ button.
Pages a standard window close red button.
Numbers a handle to drag the panel closed.
BBEdit (and so I assume TextWrangler, too) a standard window close red button.

Maybe a system-wide option for close buttons, as suggested here, would work to eliminate interface chrome for those who don’t like it while leaving an option for those who do.[/quote]

That’s a good point, Bob. I was focusing on whether the dialog could be toggled or dismissed with ESC and didn’t even think about a button.

0 Likes

#12

For what it’s worth, in Safari, Shift+Cmd+F hides the search panel, which I like as a mapping.

0 Likes