vim 去掉自动注释和自动回车

开启了自动注释和自动缩进对粘帖代码不方便
 
关闭自动注释
:set fo-=r 
关闭自动缩进(这个对C/C++代码好像无效)
:set noautoindent
关闭C语言缩进 
:set nocindent
 
再 Shift + Insert 
 
恢复 
 
:set fo=r 
:set autoindent
:set cindent
 
启动生效请修改vimrc文件

原文地址:https://www.cnblogs.com/LIAOBO/p/13712334.html