auto-complete: Better binding for hippie-expand

Using a remap is better, because it will "automatically toggle" the key
binding if hybrid-mode is toggled.

The previous version just disabled the key binding completely if someone
used hybrid style.
This commit is contained in:
justbur 2016-02-01 09:23:55 -05:00 committed by Eivind Fonn
parent 723a27c424
commit d9cf37e4e7
1 changed files with 1 additions and 2 deletions

View File

@ -168,8 +168,7 @@
(defun auto-completion/init-hippie-exp ()
;; replace dabbrev-expand
(global-set-key (kbd "M-/") 'hippie-expand)
(when (eq dotspacemacs-editing-style 'vim)
(define-key evil-insert-state-map (kbd "C-p") 'hippie-expand))
(define-key evil-insert-state-map [remap evil-complete-previous] 'hippie-expand)
(setq hippie-expand-try-functions-list
'(
;; Try to expand word "dynamically", searching the current buffer.