In Sublime, after I do one 'replace all', the find/replace text boxes at the bottom of the screen disappear. I often do multiple replace alls, so I want the boxes to stay there / persist until I explicitly close them. I feel like I have gotten this to work in the past, but can't find a way to get back to it.
Or, if you want to find and replace text in a number of files at once, press Command + Shift + F or Control + Shift + H to open Sublime Text's Find in Files tool that can search and replace across as many files as you have open or select from its menu.
Alt+F3 gives a really simple way to do find and replace: Use it to select all occurrences of the current word or selection, then just start typing to replace or edit them all at once.
This is tested only in Sublime Text 3, but should work in ST2 as well:
Select Preferences > Key Bindings -- Default
.
Search for ctrl+alt+enter
and copy entire block.
Select Preferences > Key Bindings -- User
.
Paste copied block anywhere and remove , "args": {"close_panel": true}
part from it.
Save Key Bindings -- User
and test it (you don't need to restart Sublime Text).
Since you have modified just the key binding, you should remember, that expected behavior will work only if you execute Ctrl+Alt+Enter inside search & replace panel.
If you click Replace All
button, the "old" behavior will be applied -- i.e. panel will be closed.
On the latest version of sublime, these settings can be turned off as desired in your preferences.
// This determines whether the find panel is closed when the "Find All" // or "Replace All" buttons are pressed. Note this does not change the // keybinding behavior. "close_find_after_find_all": true, "close_find_after_replace_all": true,
simply go to Preferences->Settings
and add this line in the right side window "close_find_after_replace_all": false,
Update Dec-2021: See answer by user 'beginner'; will leave this for historical purposes but that answer should be the accepted solution; apparently the feature was finally added in build 4092.
I too was looking for this (7 years later!). I also looked through the settings and tried to search on sublime forums and google... but trejder's answer appears to be only option that currently exists.
Since I didn't see any requests for it, I went ahead and created a feature request over on the sublime forums for this.
Hopefully, it will either be accepted or some forum guru will tell me I'm an idiot and the feature already exists. Posting the link mainly so any other souls wandering in from search engines might be able to check if there have been any updates.
Cross your fingers :-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With