evil 按u来undo 时不时会卡住

这个问题会时不时出现一次,卡住2,3秒左右。 大家有什么好的建议吗?

首先设置(setq evil-want-fine-undo t)使用Emacs内置的undo模式而不是模拟Vim的,这样就会改善一点。

如果开了undo-tree-enable-undo-in-region的话把它关掉。

如果以上措施都做了还是觉得卡的话,调一下GC阈值,可以采用 MELPA 这个包来优化一下。附我的GCMH配置:

(use-package gcmh
  :ensure t
  :custom
  (gcmh-idle-delay 10)
  (gcmh-high-cons-threshold #x6400000) ;; 100 MB
  :hook (after-init . gcmh-mode))

如果都做了还是卡,还是换 MELPA

1 个赞