markonm / traces.vim

Range, pattern and substitute preview for Vim
MIT License
742 stars 13 forks source link

Substitution preview doesn't show when the substitution string is blank #35

Closed novadev94 closed 4 years ago

novadev94 commented 4 years ago

I think a screen capture would describe it in the easiest way :D

image

novadev94 commented 4 years ago

After some searching, I found this: https://github.com/markonm/traces.vim/commit/2bfc63174002903e350de418006eea83efcc8901

I'm just curious about how the decision was made back then.

markonm commented 4 years ago

The reasoning behind the commit was to allow one to see matched text while using mappings such as nnoremap gss :%s/\<<c-r><c-w>\>//g<left><left>. Previewing empty string seems less useful in comparison.

novadev94 commented 4 years ago

Thanks!

lkintact commented 5 months ago

@markonm Maybe that behaviour should be made configurable via a variable?