markonm / traces.vim

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

:,$s/ enters visual mode and selects file till end #32

Closed Viv1k closed 5 years ago

Viv1k commented 5 years ago

After installing this plugin, I tried replacing content from current line to end but it ended up going in visual mode and selecting the text till the end of the file.

You can see in the attached png that as I typed "/" it goes in visual mode. image

markonm commented 5 years ago

This is a feature. The plugin is highlighting the range with Visual highlighting group. In the screenshot it is visible that the mode remains Command-line. Your status line has COMMAND written in it and the cursor is still positioned inside Command-line area.

Range preview is triggered for ranges that include pattern or mark address or when you type delimiter for commands that support pattern preview.

Viv1k commented 5 years ago

Oh okay. Is there any way to disable this visual selection? I want preview without visual selections. Your plugin works perfectly when I substitute using :%s/access/fetch (no visual selection) but with ,$s/acsess/fetch, it selects text upto end of file which is very distracting.

Thanks

Viv1k commented 5 years ago

No, It is fine. I think I'll survive with this feature. I have set g:traces_preserve_view_state to 1 which does not moves my current view with selecting text upto end. Closing this issue.