I've read this thread indicating how to find and replace within selection in ST2. Despite reading this thread but still cannot figure out if it's possible to do a simple find and replace within selection in ST3?
show_panel
command by going to preferences -> keybindings, then adding this line to the user keybindings: { "keys": ["ctrl+shift+s"], "command": "show_panel", "args": { "panel": "replace", "in_selection": true } }
to ensure that the "in selection" mode is active and skip the next step. (see the forums for more available args.)If you want to change the selection you are searching within, you will need to close and re-open the panel.
If the region/selection you are searching within always contains multiple lines, you may want to consider setting the following preference for convenience:
// When auto_find_in_selection is enabled, the "Find in Selection" flag
// will be enabled automatically when multiple lines of text are selected
"auto_find_in_selection": true,