On 2022-04-16, jclsn wrote:
> Well, kind of, but I would like it to be extended to the following
> functionality:
>
> 1. Provide an option to highlight all occurrences of the search. Currently it
> just highlights the first one. This might be a matter of taste.
:set hlsearch
See
:help 'hlsearch'
> 2. More importantly: When using search and replace, it would be great to
> preview the replacement. So after you type ```:%s/someword/`` all
> occurences should instantly show a preview. This would immensely help with
> strings that contain a lot of escaped characters.
Since you can easily undo the effects of a :substitute command,
I don't see much advantage to having a preview. If you don't like
the results, undo them and try again. You can also try it on one
line at a time instead of the whole file while you're experimenting
with it. Another approach to finding out if the command is what you
want is to use the :DiffOrig command,
:help :DiffOrig
to see a side-by-side comparison of the before and after states of
your file.
HTH,
Gary
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220416215020.GA10576%40phoenix.