Вы можете изменить требуемый по умолчанию «магический уровень»
:se nomagic
:se magic
См. :he magic
Я бы рекомендовал вместо этого использовать соответствующие экранированные символы, чтобы не нарушить другие сопоставления.
/\v(\d+)
будет соответствовать последовательным цифрам, как и следовало ожидать, с Perl Regex
From pattern.txt help:
Examples:
after: \v \m \M \V matches ~
'magic' 'nomagic'
$ $ $ \$ matches end-of-line
. . \. \. matches any character
* * \* \* any number of the previous atom
() \(\) \(\) \(\) grouping into an atom
| \| \| \| separating alternatives
\a \a \a \a alphabetic character
\\ \\ \\ \\ literal backslash
\. \. . . literal dot
\{ { { { literal '{'
a a a a literal 'a'
{only Vim supports \m, \M, \v and \V}
It is recommended to always keep the 'magic' option at the default setting,
which is 'magic'. This avoids portability problems. To make a pattern immune
to the 'magic' option being set or not, put "\m" or "\M" at the start of the
pattern.