svermeulen / vim-subversive

Vim plugin providing operator motions to quickly replace text
MIT License
298 stars 4 forks source link

How to make visual work with the Substitute Motion #13

Closed blasco closed 5 years ago

blasco commented 5 years ago

The mappings provide the following:

" s for substitute
nmap s <plug>(SubversiveSubstitute)
nmap ss <plug>(SubversiveSubstituteLine)
nmap S <plug>(SubversiveSubstituteToEndOfLine)

Why there are no mappings to substitute the visual selection? Is this not working? Any idea how could it be fixed?

blasco commented 5 years ago

I think that the problem might me on my side. I would like to have, s for the normal mode and ss for the selection mode:

" s := substitute
nmap s <plug>(SubversiveSubstitute)
" ss := substitue selection
xmap ss <plug>(SubversiveSubstitute)

Doesn't seem to be working.

svermeulen commented 5 years ago

What you have there should work (xmap ss <plug>(SubversiveSubstitute)). What doesn't work about it?

blasco commented 5 years ago

It seems to be working now. Thank you for the support and great plugin!