1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-05 16:18:01 +00:00

Add Case-Aware Substitution With vim-abolish as a vim til.

This commit is contained in:
jbranchaud
2015-08-25 20:31:05 -05:00
parent 3d1477775a
commit a783cac28a
2 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# Case-Aware Substitution With vim-abolish
Substitution in vim is, by default, case-sensitive. Adding the `i` `s-flag`
makes it case-insensitive.
[`vim-abolish`](https://github.com/tpope/vim-abolish), on the other hand, lets
you perform a case-insensitive substitution that preserves three case
variants (foo, Foo, and FOO). Substitution with `vim-abolish` can be
performed with `Subvert` or `S`.
For instance, `:%S/blog/article/g` will turn
```
blog Blog bLOg BLOG
```
into
```
article Article bLOg ARTICLE
```
Install `vim-abolish` and see `:h Subvert` for more details.