company: tab now complete common prefix and cycle, RET is back

This commit is contained in:
syl20bnr 2015-04-26 23:14:34 -04:00
parent d8cc7c9a31
commit d9bc198d1f

View file

@ -81,11 +81,11 @@
;; key bindings
;; use TAB to auto-complete instead of RET
(let ((map company-active-map))
(define-key map [return] 'nil)
(define-key map (kbd "RET") 'nil)
(define-key map [tab] 'company-complete-common)
(define-key map (kbd "TAB") 'company-complete-common)
(define-key map (kbd "<tab>") 'company-complete-common)
(define-key map [tab] 'company-complete-common-or-cycle)
(define-key map (kbd "TAB") 'company-complete-common-or-cycle)
(define-key map (kbd "<tab>") 'company-complete-common-or-cycle)
(define-key map (kbd "<S-tab>") (lambda () (interactive)
(company-complete-common-or-cycle -1)))
(define-key map (kbd "C-j") 'company-select-next)
(define-key map (kbd "C-k") 'company-select-previous)
(define-key map (kbd "C-/") 'company-search-candidates)