Regex substitutions
When using regexes to perform substitutions in VIM you might have noticed that they quickly become unreadable. You have
to escape almost every special character.
If you, like me, prefer to use extended regular expressions you can start your substitutions with \v to enable something
called "very magic" mode. That means that all ASCII characters expect 0-9, a-z, A-Z and _ have special meaning.
As an example lets just use a regex group to quote the first 4 consecutive characters on every line:
:%s/\v([a-z]{4})/"\1"
Here is an example of what that looks like in my current buffer:

Unfortunately, there isn't a setting to enable very magic mode by default.
The end
I usually tweet something when I've finished writing a new post. You can find me on Twitter
by clickingÂ