vim中设置了autoindent后,粘帖带缩进的代码会造成多余的缩进。 用下面的代码解决这个问题 :r! cat //and then paste ( shift + insert ) the content, and CTRL+D.