hi,各位 emacs道友,最近在用 tabnine 感觉写js特别爽。但是根据官网的意思只能过mate 1,mate 2 …这种方式来选词,感觉有点不太友好,用过了光标加回车的习惯,所以想通过光标选中某个词加回车的方式来选词,看看各位能否有什么好的方法解决。我用的是mac 和 linux系统,只用 emacs,没有用 eval mode和spacemacs。
八成你跟我一样是从官网上抄的配置,那么注释掉下面这些就可以了
;; Trigger completion immediately.
(setq company-idle-delay 0)
;; Number the candidates (use M-1, M-2 etc to select completions).
(setq company-show-numbers t)
;; Use the tab-and-go frontend.
;; Allows TAB to select and complete at the same time.
(company-tng-configure-default)
(setq company-frontends
'(company-tng-frontend
company-pseudo-tooltip-frontend
company-echo-metadata-frontend))
我也抄的.
;; Trigger completion immediately.
(setq company-idle-delay 0)
;; Number the candidates (use M-1, M-2 etc to select completions).
;; (setq company-show-numbers t)
;; Use the tab-and-go frontend.
;; Allows TAB to select and complete at the same time.
(company-tng-configure-default)
(define-key company-active-map (kbd "RET") 'company-complete-selection)
(define-key company-active-map (kbd "C-n") 'company-select-next)
(define-key company-active-map (kbd "C-p") 'company-select-previous)
(setq company-frontends
'(company-tng-frontend
company-pseudo-tooltip-frontend
company-echo-metadata-frontend))
1 个赞
牛比啊,你猜的真对啊,去掉就好了,谢谢…
谢谢您,不过你这种方法我试了不行啊!
¯\_(ツ)_/¯ 解决了就好。