vim 中键粘帖 排版混乱,自动缩进的解决方法

输入 :set paste
然后插入模式会显示

 -- INSERT (paste) --

需要关闭时
输入:set nopaste

为了方便 在vimrc中加入:

set pastetoggle=<F3> 

这样就可以用F3 来切换了