Sublime Forum

Bug report: Can't tab to 'Replace with' edit box

#1

When ST is newly started, it is impossible to tab to the ‘Replace with’ edit box in the Find/Replace tool. This is a minor bug, but I find it annoying because I don’t like to use the mouse.

(Edit: I’m using 20091212.)

Steps to reproduce bug:

  1. Close ST if it is open.
  2. Open ST.
  3. Ctrl-N to start a new document if there is not a document open there already.
  4. Ctrl-H to bring up the Find/Replace tool.
  5. Press Tab to try to move the cursor to the ‘Replace with’ edit box.
  6. Step #5 does not work.

Work-around:

If you click in the ‘Replace with’ box, then tabbing will work from that point on.

0 Likes

#2

I second this, it is quite annoying.

0 Likes

#3

This is fixed in 20100118

0 Likes

#4

Great thanks

0 Likes

#5

Yes, thanks.

I couldn’t however find a way to drive search/replace completely from the keyboard without having to click anything.

There don’t seem to be any shortcut keys that activate the “Replace”, “Replace All”, and “Find All” buttons in the search/replace panel. I looked in the default keymap file, but I couldn’t find anything.

I think the Enter key used to do a Replace All. (Which, thinking about it now, wasn’t what you always wanted to do.)

0 Likes

#6

In the find panel:

Enter: Find
Ctrl+Enter: Insert a newline
Alt+Enter: Find All
Shift+Enter: Find Previous

In the incremental find panel:

As above, but a Enter will close the panel.

In the replace panel:

Enter: Find
Ctrl+Enter: Insert a newline
Alt+Enter: Replace all
Shift+Enter: Find Previous

Find in files:

Enter: Search
Ctrl+Enter: Insert a newline

0 Likes

#7

Any chance of adding tooltips to the Find, Find Prev, Find All etc. that include the keyboard shortcuts, like you do for Case Sensitive and Whole Word? Would make discovering these things easier for us newbies. :smile:

0 Likes

#8

[quote=“jps”]In the find panel:
Enter: Find
Ctrl+Enter: Insert a newline
Alt+Enter: Find All
Shift+Enter: Find Previous

In the incremental find panel:
As above, but a Enter will close the panel.

In the replace panel:
Enter: Find
Ctrl+Enter: Insert a newline
Alt+Enter: Replace all
Shift+Enter: Find Previous

Find in files:
Enter: Search
Ctrl+Enter: Insert a newline[/quote]

Very helpful…except it’s still missing a keyboard shortcut for “Replace and Find Next”, both outside the replace panel and within it, and it’s missing keyboard shortcuts for that and replace all from outside any panel. I find invaluable the workflow in TextMate of cmd-E (enter find string), cmd-shift-E (enter replace string), cmd-G (find next), cmd-opt-F (replace current and find next) and cmd-ctrl-F (replace all). With subtle finger movements (very little movement) I can set up a find and replace, cycle through a bunch of matches to ensure it’s what I want, and then either replace all or (if I’m feeling nervous) selectively move through the matches replacing only where appropriate. No mouse, no panels, almost no context switching.

Please add (or tell us how to add our own) keyboard shortcuts for ReplaceAll and ReplaceAndFindNext.

0 Likes