Le Wang <l26w...@gmail.com> writes: > On Mon, Mar 21, 2011 at 3:41 AM, Eric S Fraga <e.fr...@ucl.ac.uk> wrote: >> Le Wang <l26w...@gmail.com> writes: >> >>> Why did you give up on yasnippet? >> >> Confusion amongst the key bindings, between org, yasnippet and the >> autocompletion tools I have been trying. I want to be able to use TAB >> for completion. >> >> I may come back to yasnippet in due course so it's nothing to do with >> yasnippet per se. >
I've been using the following yasnippet/org configuration for a long while now binding yas/expand to TAB. #+begin_src emacs-lisp (defun yas/org-very-safe-expand () (let ((yas/fallback-behavior 'return-nil)) (yas/expand))) (add-hook 'org-mode-hook (lambda () ;... ;; yasnippet (using the new org-cycle hooks) (make-variable-buffer-local 'yas/trigger-key) (setq yas/trigger-key [tab]) (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand) (define-key yas/keymap [tab] 'yas/next-field) )) #+end_src Best -- Eric > > I too had this issue of expansion confusion, especially when I > installed the premade yasnippet packs. > > I solved it by adding moving yasnippet off the [tab] key, and adding > it to hippie-expand, which I map to (M-/): > > (setq yas/trigger-key nil) > (add-to-list 'hippie-expand-try-functions-list 'yas/hippie-try-expand) > > >> -- >> : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1 >> : using Org-mode version 7.5 (release_7.5.90.g1fb3.dirty) >>