gpt4 book ai didi

Emacs 光标移动建议

转载 作者:行者123 更新时间:2023-12-01 05:23:07 26 4
gpt4 key购买 nike

我编写了一个次要模式,当光标在缓冲区中移动时突出显示缓冲区的各个部分。我通过建议这样的运动功能来做到这一点。

...
(defadvice next-line (after showcss/advise-main)
"Advice around cursor movement"
(highlight-some-stuff))
(defadvice previous-line (after showcss/advise-main)
"Advice around cursor movement"
(highlight-some-stuff))
(defadvice right-char (after showcss/advise-main)
"Advice around cursor movement"
(highlight-some-stuff))
(defadvice left-char (after showcss/advise-main)
"Advice around cursor movement"
(highlight-some-stuff))
(defadvice forward-word (after showcss/advise-main)
"Advice around cursor movement"
(highlight-some-stuff))
(defadvice backward-word (after showcss/advise-main)
"Advice around cursor movement"
(highlight-some-stuff))
...

但这似乎是错误的做法。我一直在寻找光标移动的钩子(Hook),但似乎没有。

我是否缺少一个可以使用的钩子(Hook)而不是建议一堆运动功能,还是有更好的方法来解决这个问题?

最佳答案

嗯...几天前我给你发了一封电子邮件,建议在 GNU ELPA 中包含 showcss,我还建议你使用 post-command-hook而不是那些坏习惯。

关于Emacs 光标移动建议,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15452923/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com