在vim中编辑长行的xml文件真的很慢.我能做些什么来解决这个问题? [英] Editing xml files with long lines is really slow in vim. What can I do to fix this?

查看:67
本文介绍了在vim中编辑长行的xml文件真的很慢.我能做些什么来解决这个问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 vim 编辑了很多 xml 文件.问题是,由于线路很长,vim 中的导航/编辑非常慢.有什么我可以做的(除了关闭语法高亮/文件类型插件和文件类型缩进),以便能够在没有延迟的情况下编辑这些文件?

I edit a lot of xml files with vim. The problem is that, because of the long lines, navigation/editing in vim is extremely slow. Is there something I can do (besides turning off syntax highlighting/filetype plugins and filetype indentation) to be able to edit these files without all that lag?

vim 处理语法高亮等琐碎的事情真的很令人沮丧.我不记得这是任何其他编辑器的问题.我真的很喜欢使用 vim,我希望有办法解决这个问题.

It's really frustrating that a trivial thing such as syntax highlighting is being handled so poorly by vim. I don't remember this being an issue with any other editor. I really like using vim and I hope there is some way to fix this.

推荐答案

问题是 VIM 语法高亮对于长行来说很慢.一个只会稍微降低功能的简单修复是将语法突出显示限制为前 x 列.在你的 .vimrc 中是这样的:

The problem is that VIM syntax-highlighting is slow for long lines. An easy fix that only slightly degrades functionality is to limit syntax highlighting to the first x columns. Something like this in your .vimrc:

set synmaxcol=120

这篇关于在vim中编辑长行的xml文件真的很慢.我能做些什么来解决这个问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆