我不知道爲什麼,但如果我通過CTRL + V + P
快捷方式從某個外部程序複製代碼,我總是會弄亂我的格式。例如這個片段的XML代碼如何從剪貼板粘貼具有相同格式的源代碼
<dependency>
<groupId>org.jboss.test</groupId>
<artifactId>richfaces-selenium</artifactId>
<scope>test</scope>
</dependency>
被複制到Vim中像這樣(對不起,|
字符,也就是從indentLine
插件)
<dependency>
│ │ │ │ │ <groupId>org.jboss.test</groupId>
│ │ │ │ │ │ │ │ <artifactId>richfaces-selenium</artifactId>
│ │ │ │ │ │ │ │ │ │ │ <scope>test</scope>
│ │ │ │ │ │ │ │ │ │ │ │ │ </dependency>
那麼,如何解決這個問題?當我粘貼Java或Python代碼時也會發生類似的事情。