Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
(define-key company-active-map "\t" 'company-yasnippet-or-completion)
(defun company-yasnippet-or-completion ()
(interactive)
(if (yas/expansion-at-point)
(progn (company-abort)
(yas/expand))
(company-complete-common)))
(defun yas/expansion-at-point ()
"Tested with v0.6.1. Extracted from `yas/expand-1'"
(first (yas/current-key)))

mibadim commented Oct 6, 2014

Does not work with Yasnippet Version 20141005.124 installed from MELPA. M-x company-yasnippet-or-completion returns the error Symbol's function definition is void: yas/current-key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment