I have a purchased / registered copy of Sublime Text 3 (not sure if any feature difference between that and free version). I’m on v3.2.2-build-3211, which I believe is the latest available for my system (Linux Mint).
I would like to request a new setting to modify a side-effect of the Replace All button. I apologize if there is already some setting for this; I did look in settings/google but only came up with workarounds that weren’t quite the same. The behaviour I am seeing currently is that when clicking the Replace All button, the Find Bar is closed and I have to re-open it. The change I would like to request is to add a setting such as “auto_close_panel_on_replace_all”: true|false which if false would prevent the Find Bar from being closed when the user clicks Replace All. It appears to have the same behaviour regardless of whether regex is enabled or not.
The workaround I mentioned earlier was to remap a keybinding, but I would still prefer to have this behaviour on the button itself. I didn’t like the keybind option as that is slower for me and I am more likely to forget the keybinding whereas the button is quick, easy, and pretty hard to mess up even at the end of an all nighter.
Can’t accurately judge the level of effort without the code but based on the fact that the default keybinding already is using a boolean argument named close_panel, I suspect that adding a similar preferenceto control this behavior on the button as well may be fairly simple to implement.
{ "keys": ["ctrl+alt+enter"], "command": "replace_all", "args": {"close_panel": true},
"context": [{"key": "panel", "operand": "replace"}, {"key": "panel_has_focus"}]
},
It seems that there are plenty of others interested in the same behaviour as well. Please see below links:
- Stackoverflow.com - Find/Replace panel in Sublime Text disappears after Replace All
- Sublime Forums - How to keep the replace box remain after a replace all
If more justification is desired for implementing this, consider that there are many cases where multiple replacements might need to be applied one after the other. Likewise, some regex replaces take multiple passes before all matches are exhausted in the document (especially true for complex matches that appear in a series).