|
|
|
|
|
by WizardClickBoy
648 days ago
|
|
This reminds me of the substitution mode of Tim Pope's amazing vim plugin [abolish](https://github.com/tpope/vim-abolish?tab=readme-ov-file#subs...) Basically in vim to substitute text you'd usually do something with :substitute (or :s), like: :%s/textToSubstitute/replacementText/g ...and have to add a pattern for each differently-cased version of the text. With the :Subvert command (or :S) you can do all three at once, while maintaining the casing for each replacement. So this: textToSubstitute TextToSubstitute texttosubstitute :%S/textToSubstitute/replacementText/g ...results in: replacementText ReplacementText replacementtext |
|
[1] https://www.gnu.org/software/emacs/manual/html_node/emacs/Re...