Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Possibility to "Replace" without automatically doing "Find next" #4437

Closed
P-Si opened this issue Apr 20, 2018 · 6 comments
Closed

Comments

@P-Si
Copy link

P-Si commented Apr 20, 2018

Description of the Issue

I'm doing a fairly complex RegEx "search & replace", and would like to see what my RegEx actually did to the firstly found string before jumping ahead to next matching string in my file.

Steps to Reproduce the Issue

Do any "Replace" and after replacing the cursor jumps automatilcally to the next item, so I cannot see what the replace actually did to the found string.

Desired Behavior

Have a possibility to press (for example) "alt" key while pressing "Replace" button in order to just replace without jumping ahead to next matching string in file

pekka

@dinkumoil
Copy link
Contributor

I would like to have such a feature too.

@Yyyyes
Copy link

Yyyyes commented Dec 22, 2018

Hi. I would like to have such a feature too. - I have that same problem over and over again. Thanks

@sasumner
Copy link
Contributor

So a known workaround to this, is after doing your replace (single), switch back to the editor tab and do an Undo than a Redo (use keystrokes). Your caret will be left where the substitution occurred. Ideal? Nope. Workable? Well, I find it to be.

@Yyyyes
Copy link

Yyyyes commented Dec 23, 2018

I used the workaround for quite some time, but I am fed up with it..
Not having the text moved on the screen would make it much easier to check the replacement (presently, when coming back, the doc doesn't display at the same line as before, so I have to search for the cursor position too). Very often, I ask myself "did it do what I expected?," And I go back to check... " a real pain, with the risk of adding errors in the process.

What makes it so difficult to split the button into two button ----- a first<replace & stay// go next if just replaced here> and --- a second <replace & go to next>?
For the shortcut keys, the SAME shortcut key should allow, first hit to and, second hit, if no cursor move has been done, to .
Alternatively, a solution coud be to optionnaly put a delay (1-2 seconds) in order to view the replacement result before proceeding to next occurence.
Why is it such an extraordinary request to be able to check the result of the operation before going to the next one ? For instance, Textpad does it with a pair of buttons.

Y.
PS I would also ask for shortcut keys for the < >> find next> and < << find previous> operations.

@sasumner
Copy link
Contributor

I used the workaround for quite some time, but I am fed up with it.

Here's another workaround that can be handy, but you won't like: Press Replace All. The screen doesn't change so you can see your first replacement. You can undo it like the other workaround and then continue on...

What makes it so difficult to split the button into two button...

Nothing.

Why is it such an extraordinary request...

It isn't.

@Yyyyes
Copy link

Yyyyes commented Apr 28, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants