4 ms·
I tried this plugin a few days ago, but it seemed to break the s (substitute) command, so I removed it. Does someone know how to make it work? The problem is t
by thamer 18y ago
I tried this plugin a few days ago, but it seemed to break the s (substitute) command, so I removed it. Does someone know how to make it work?
The problem is the following: Write a line of text, select part of it using v, then press s to remove the selection and enter insert mode to start replacing it. This doesn't work anymore when surround.vim is loaded. Too bad, it sure looks great…
- pkrumins 18y agoTry 'R' instead of 's' that you were used to. OR Edit surround.vim and comment out the 's' mappings in visual mode. Like this: " if !hasmapto("<Plug>Vsurround","v") " if exists(":xmap") " xmap s <Plug>Vsurround " else " vmap s <Plug>Vsurround " endif " endif " if !hasmapto("<Plug>VSurround","v") " if exists(":xmap") " xmap S <Plug>VSurround " else " vmap S <Plug>VSurround " endif " endif
- thamer 18y ago'R' replaces the whole line, so that won't do. I commented the script as you suggested and it works. Thank you!
- sofal 18y agoIf I'm not mistaken, I believe that pressing c instead of s in that situation will do the exact same thing.