在 Emacs 中自动更正单词时强制 Flyspell 转到单词末尾
我发现当你执行 Flyspell-auto- Correct-word 命令时,flyspell 似乎停留在单词的中间,这很烦人。可以更改此设置以在运行命令后强制它转到单词的末尾吗?它可能就像设置一个键绑定到自动完成单词然后向前移动单词一样简单,我知道该怎么做。但这并非在所有情况下都有效,因为有时如果自动完成的单词小于键入的单词,它会将光标放在单词后面。对此的任何帮助都会很棒。
I have found it annoying that flyspell seems to stay in the middle of the word when you do flyspell-auto-correct-word command. Can this be changed to force it to go to the end of the word after running the command? It might be as simple as setting a key binding to auto-complete-word and then move-forward-word which I know how to do. But this won't work in all cases because sometimes it puts the cursor behind the word if the auto-complete word was smaller than the typed word. Any help on this would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试以下代码:
使用 Flyspell 版本 1.7k 以及 Emacs 23.2 附带的版本进行测试。
Try this code:
Tested with flyspell version 1.7k, and with the version shipped with Emacs 23.2.
我浏览了
(defun Flyspell-auto- Correct-word ...)
,我看不到任何好的钩子或其他自定义点,所以我认为你最好的选择是使用Ch f defadvice
:I looked through the
(defun flyspell-auto-correct-word ...)
and I can't see any good hooks or other customization points there so I think your best bet is to useC-h f defadvice
: