-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
添加pause和resume函数 #15
Comments
不知道这样行不行 |
我尝试了下没有效果,不过应该是有的啊。我还试过deactivate-input-mode,都没有效果,也不清楚是怎么回事。 |
没有 pyim-mode 这个 mode |
(defvar pyim-org-speed-timer nil)
(defun pyim-org-speed ()
(interactive)
(when pyim-org-speed-timer
(cancel-timer pyim-org-speed-timer))
(setq pyim-org-speed-timer
(run-with-timer
nil 0.1
'(lambda ()
(if (and (bolp)
(looking-at org-heading-regexp))
(setq pyim-input-ascii t)
(setq pyim-input-ascii nil)))))) 也个比较 diao si 的解决方法,可以暂时试一试。。。。。。。 |
如果你的手太快,把 0.1 改为 0.01 |
这个方法好粗暴,不过那个pyim-active-mode是啥? |
pyim-active-mode? 我搜了一下代码,好像没有这个东西呀,抱歉。。。。这个代码一开始是从 eim fork过来的。。。我也得慢慢熟悉。 |
倒是有一个 pyim-active-hook, 不过这个hook是第一次加载 pyim 时运行的。 似乎不适用与这种情况。 关键问题还是要让pyim识别 “org speed” ,但这些代码写到核心里不太适合。。。。 再想想有什么好注意。 |
虽然说 timer 的方式比较 粗暴,不过不失为一种可行的方法。 |
|
万分感谢,问题已经解决。 |
不客气,这个功能很有用,可以显著的提升输入法的体验。 |
org-mode中使用speed-command时,每次还需要再切换到默认输入法,总感觉还是有点麻烦。
所以希望能添加两个函数和一个hook,比如这样:
The text was updated successfully, but these errors were encountered: