4

flymake と入力すると、カーソルが少しハングします。ちょっと面倒です。

何かを変更するたびに解析してコンパイルしないようにflymakeに指示する方法があるかどうか疑問に思っていました。保存するときに実行してください。

他の提案はありますか?

ありがとう、

4

1 に答える 1

3

You can override the flymake-after-change-function from flymake.el by putting this in your .emacs or init.el file:

(eval-after-load "flymake"
  '(progn
    (defun flymake-after-change-function (start stop len)
      "Start syntax check for current buffer if it isn't already running."
      ;; Do nothing, don't want to run checks until I save.
      )))

You will still get a syntax check when you save and when you initially load a file, if you don't like the initial syntax check on loading the file, you should be be able (I haven't tested this part) to turn it off with:

(setq flymake-start-syntax-check-on-find-file nil)

Edit: not directly related to your question, but might be helpful if just the lag is an issue, you can tailor how long you should be idle before the save kicks in with:

;; Only run flymake if I've not been typing for 5 seconds
(setq flymake-no-changes-timeout 5)

The default is 0.5 seconds, so perhaps changing it to 5 like me might help you more than simply turning it off entirely.

于 2011-08-02T22:57:53.687 に答える