سؤال

In Vim, equals (=) is the same as question mark (?) in a regex, as in:

a? is same as a= is same as a 0 or 1 times.

When you search with /v on you have to escape =. I don't want to have to escape =, because that's not a standard regex character. Can I make Vim treat = as literal in regex search mode?

هل كانت مفيدة؟

المحلول

There is no way to do this when you have enabled very magic mode by using \v. This specifically asks Vim to treat = as a special character. In other modes besides very magic it is treated as a literal and not a special character.

نصائح أخرى

The very point of \v is to make everything "very magic", so why not just use \m?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top