How to enable “Very magic” mode in vim with vimrc?

余生长醉 提交于 2019-12-22 03:44:43

问题


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


回答1:


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".



来源:https://stackoverflow.com/questions/9273133/how-to-enable-very-magic-mode-in-vim-with-vimrc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!