codemirror-vim icon indicating copy to clipboard operation
codemirror-vim copied to clipboard

Feature: Replacement Preview

Open Opisek opened this issue 1 year ago • 2 comments

VsCodeVim has a neat feature of previewing replacement commands.

While writing :%s/foo, it will highlight all occurrences of foo (1 per line). When proceeding with :%s/foo/bar it will keep the highlight on the previously marked words, but they will now be visibly changed to bar. Similarly, adding the finishing :%s/foo/bar/g, it will apply that preview to multiple occurrences per line.

I think that's a great way of knowing if the regex you're trying to replace works as intended.

Would that be a feature that would also fit CodeMirror Vim?

Opisek avatar Jan 17 '24 14:01 Opisek

Yes, this sounds like a useful feature.

nightwing avatar Jan 17 '24 15:01 nightwing

Great, will look into it when I have some time.

Opisek avatar Jan 18 '24 23:01 Opisek