Sublime Forum

RegExp substituting

#1

When toggling Search/Replace mode ("Ctrl+F" and “Ctrl+H” accordingly)
first match substitutes the RegExp, so you need to type it once more or to save it every time.

IMHO, this is a BUG, because the first match doesn’t make any sense in “Find” field.

[Linux/Ubuntu 16.04]

Similar post

0 Likes

#2

This looks like it might be a consequence of the following setting:

    // If true, the selected text will be copied into the find panel when it's
    // shown.
    // On OS X, this value is overridden in the platform specific settings, so
    // you'll need to place this line in your user settings to override it.
    "find_selected_text": true,

As seen here it’s turned on by default (except on OSX), and it causes the currently selected text in the buffer to be copied to the find field when the panel opens, and since finding text also selects it, swapping the panels overwrites the find string.

1 Like

#3

Thanks very much! That works… :slight_smile:

0 Likes