Skip to content

Instantly share code, notes, and snippets.

@nonsequitur
Created December 28, 2009 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nonsequitur/265010 to your computer and use it in GitHub Desktop.
Save nonsequitur/265010 to your computer and use it in GitHub Desktop.
(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
Copy link

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