-
Notifications
You must be signed in to change notification settings - Fork 93
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
能不能设置一个开关,可以将mini buffer中输入法屏蔽? #34
Comments
同学可以参考 #15, 只要你能写一个函数,判断在什么情况下需要开启输入法,上面的功能就可以简单实现。。。。 |
这个的思路非常多,比如你通过可以通过当前执行的命令来判断,通过buffer mode 来判断,甚至通过当前字符串来判断。。。。具体就要看你的实际情况了。 |
org-speed是一个同学的配置,chinese-pyim没有包含。。。 |
Thanks, that solved my question. BTW, I wrote a switch function for helm, check it out: #21 |
目前的解决方案: (defun pyim-helm-buffer-active-p ()
(string-prefix-p "helm" (buffer-name (window-buffer (active-minibuffer-window)))))
(setq pyim-english-input-switch-function
'pyim-helm-buffer-active-p) |
multi-switch , |
如 #21 (comment) 所说,这个函数的确不管用了。我写了一个函数加到了 hook 里面,可以在进入或退出 helm 的时候自动切换输入法: ;; 进入helm 的时候自动关闭当前的输入法,退出时自动恢复到之前的状态 =======
(defvar liu233w//helm-pyim-switch--last-im
nil
"最后切换的输入法")
(make-variable-buffer-local 'liu233w//helm-pyim-switch--last-im)
(defun liu233w/helm-pyim-enter ()
(setq liu233w//helm-pyim-switch--last-im current-input-method)
(set-input-method nil))
(defun liu233w/helm-pyim-exit ()
(set-input-method liu233w//helm-pyim-switch--last-im)
(setf liu233w//helm-pyim-switch--last-im nil))
(add-hook 'helm-minibuffer-set-up-hook #'liu233w/helm-pyim-enter)
(add-hook 'helm-exit-minibuffer-hook #'liu233w/helm-pyim-exit)
;; ======================================================================== |
这道也是个办法,emacs的好处就是这样的,折腾性太强了 |
现在貌似直接将 |
这个输入法非常赞!但有一个问题:
当输入法开启时,如果C-h v,选词会出现在mini buffer中,对英文变量名的输入造成影响。
但是除了这种情况之外,minibuffer中的选词还是非常有用的,搜索替换中文都很好用。是不是可以建一个列表,凡是不需要输入法的函数就丢进去?
The text was updated successfully, but these errors were encountered: