vim set regextype perl

The problem

Vim is a great editor. I use it every day, and that includes weekends. I’ve run into an issue where to search with the regular expression (dest|path): I needed to escape the parentheses and the pipe. That gets tedious.

The solution

I found my solution at stackoverflow:

At the beginning of your search expression, use \v which then uses a “very magic” regex mode in which fewer escapes are needed.



Date format for rpm changelog

This format works for me:
date "+%a %b %d %Y"

However, vim interprets % as the current filename when you do the :r !/bin/command so I don’t know how to do it other than copy-pasting.