vim插件powerline速度慢

在vim里面装了powerline插件,现象是:set paste后进入插入模式后,返回到一般模式时,状态栏的反应速度会慢一两秒,请问是什么原因?
试过strace跟踪,也看不出啥来。。
图片描述

图片描述

不光是:set paste后的插入模式,块操作等等返回一般模式也有这个问题

PS:试了下gvim,没有这个问题

阅读 4.6k
2 个回答

Powerline 的概念很有意思,所以GitHub上很多类似的项目。
但是,Powerline 这个项目本身有点过时了。

如果是喜欢这样的风格,给你推荐两个:

  • vim-airline: 开箱即用的类Powerline 插件,对很多第三方插件都做了良好适配

There's already powerline, why yet another statusline?

  • 100% vimscript; no python needed.

What about vim-powerline?

  • vim-powerline has been deprecated in favor of the newer, unifying powerline, which is under active development; the new version is written in python at the core and exposes various bindings such that it can style statuslines not only in vim, but also tmux, bash, zsh, and others.

  • lightline.vim: 高自由度的类Powerline 插件, 需要自己动手对第三方插件做适配,作者有提供参考配置

Why yet another clone of powerline?

  • vim-powerline is a nice plugin, but deprecated.

  • powerline is a nice plugin, but difficult to configure.

  • vim-airline is a nice plugin, but it uses too much functions of other plugins, which should be done by users in .vimrc.

你的问题,其实就是这两个插件要解决的:vimL实现,不需要调用外部进程
毕竟对于一个频繁刷新的状态栏来说,调用外部进程的开销太大了。

试试把下面代码加入.vimrc

set timeoutlen=1000 ttimeoutlen=0
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题