【发布时间】:2014-05-21 03:29:51
【问题描述】:
我不知道为什么,但是如果我通过CTRL + V + P 快捷方式从某个外部程序复制代码,Vim 总是会弄乱我的格式。比如这个 XML 代码的 sn-p
<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 代码时,也会发生类似的事情。
【问题讨论】:
标签: vim formatting paste