Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable "Very magic" mode in vim with vimrc?

Tags:

vim

When search something, always typing \v is quite boring.
How to write .vimrc to make it the default regular expression mode?

like image 895
hero2008 Avatar asked Feb 14 '12 07:02

hero2008


1 Answers

I don't think there is a dedicated setting (like :set magic) but I have this line in my ~/.vimrc:

nnoremap / /\v

that make every forward search "very magic".

like image 86
romainl Avatar answered Sep 27 '22 18:09

romainl