3 ms·
One feature I really liked when I used evil, which wasn't present in vim, was search/replace with `s/` replicated the case in the replacement string. So `s/one/
by sph 4y ago
One feature I really liked when I used evil, which wasn't present in vim, was search/replace with `s/` replicated the case in the replacement string. So `s/one/two/` would replace `One` with `Two`.
Great when you want to refactor a name that's used both as a variable and a CONSTANT in one go.
- pengaru 4y agoThat's available in vim via the vim-abolish[0] plugin... which has other capabilities, but the one I take advantage of is case-preserving S/one/two/ which does what you want. It's odd vim doesn't have that builtin, I'm half convinced it does and I just haven't dug enough to find it. [0] https://github.com/tpope/vim-abolish https://github.com/tpope/vim-abolish