是的,快忍受不了spacemacs了,启动时还提示选择一下pattern(不知道哪里设置出错了)。种草了doom,等找找doom的新手入门教程,再入手。
再次感谢善心相助
是的,快忍受不了spacemacs了,启动时还提示选择一下pattern(不知道哪里设置出错了)。种草了doom,等找找doom的新手入门教程,再入手。
再次感谢善心相助
我是从官网下载的裸spacemacs
然后只配置了smart-input-source
这样是没问题的。
(defun dotspacemacs/user-config ()里的么?(defun dotspacemacs/user-config ()
(use-package smart-input-source :config (setq smart-input-source-english-input-source “com.apple.keylayout.US”) (setq smart-input-source-other-input-source “im.rime.inputmethod.Squirrel.Rime”) (add-hook text-mode-hook #'smart-input-source-mode) (add-hook prog-mode-hook #'smart-input-source-mode) )
(setq gc-cons-threshold 100000000) ————————
应该没有少括号,可能是spacemacs其他代码冲突了?确实乱糟糟的
你是复制的么,确认下引号?感觉你用的中文
你用markdown的code fence,把原始代码贴上来。
在第一个“```”之后,可以放上语言标识,即
“```lisp”
或者,贴到 pastebin上去,https://pastebin.com/
然后把链接发上来,
(defun dotspacemacs/user-config ()
(use-package smart-input-source
:config
(setq smart-input-source-english-input-source
"com.apple.keylayout.US")
(setq smart-input-source-other-input-source
"im.rime.inputmethod.Squirrel.Rime")
(add-hook text-mode-hook #'smart-input-source-mode)
(add-hook prog-mode-hook #'smart-input-source-mode)
)
(setq gc-cons-threshold 100000000)
完整的.spacemacs文件呢?
我看看我这里能不能复现。
试试看能看到吗?确实乱糟糟的。
我试了,你这里面不能用
(use-package smart-input-source)
得用
(require 'smart-input-source)
我不知道为什么。
因为我用官方默认生成的.spacemacs里面,用use-package是没问题的。
经过以下操作:
达到以下效果:
smart-input-source-mode。 hook没起作用。<esc>退出insert模式。
居然没看出来,不过配置确实太乱了:rofl:
(use-package smart-input-source
:config
(setq smart-input-source-english-input-source
"com.apple.keylayout.US")
(setq smart-input-source-other-input-source
"im.rime.inputmethod.Squirrel.Rime")
(add-hook 'text-mode-hook #'smart-input-source-mode)
(add-hook 'prog-mode-hook #'smart-input-source-mode)
)
难怪!!!!
所以,不是use-package和 require的问题。
我一直以为 @chinhant 是原文拷贝的README配置。
原来不是。。。。 ~~~
手动执行(smart-input-source-do)会自动切换中文输入法。
而且 evil-insert-state-entry-hook 里面也有这个函数
但是,不知道为什么,
从normal模式,进入insert模式时,
实际上并没有自动切换。
(找到原因了,因为 @chinhant 设置了用evil的hybrid模式,不是vim模式)
抱歉,抱歉,抄錯了,改了之后不提示錯誤了。
东抄西抄,不求甚解,就變成這樣了。
找個時間好好規整一下,或者換doom。
到进入enter模式不自动启用的原因了,因为是hybrid模式。
这个模式不理那些hook。
如果是vim模式,那就会自动启动了。
;; One of `vim', `emacs' or `hybrid'.
;; `hybrid' is like `vim' except that `insert state' is replaced by the
;; `hybrid state' with `emacs' key bindings. The value can also be a list
;; with `:variables' keyword (similar to layers). Check the editing styles
;; section of the documentation for details on available variables.
;; (default 'vim)
dotspacemacs-editing-style 'hybrid
謝謝,能用了,謝謝鼓勵。
汉字后面跟空格触发 inline english 区域,如果输入英文后回车,会回到中文输入模式,但是如果是以下情况,不会回到中文输入模式:
我想 *加粗* 中文字体
这是规则的设计么?我觉得情况1和情况2退出inline english,回到中文,这样是不是更合适?
第一种情况,已经修正。
