tags:

views:

784

answers:

2

I am trying to get the yasnippet and pabbrev packages working together with emacs, but I cannot seem to get any love. How can I get them to play nicely together?

The crux of the problem is that pabbrev and yasnippet are binding to the tab keys. Both packages seem to do this fallback when a match isn't found, but they don't fall back properly.

I am currently using Emacs W32 (the last emacs 22 release). yasnippet is byte compiled, but pabbrev is not.

Edit: Thus far neither tabkey2 nor hippie expand work out of the box, which is why I have yet to mark either solution as a correct answer. I'm hacking away at tabkey2 to make it work though.

+1  A: 

Have a look at tabkey2.el. It looks like it addresses the problem you're having.

jfm3
+3  A: 

I use hippie expand to manage conflicting tab expansion programs.

Here the code in my .emacs file(s) that handles several different tab expansions. It will go top down through this list trying to find a match for the current tab expansion.


(require 'hippie-exp)

(setq hippie-expand-try-functions-list
      '(yas/hippie-try-expand
        try-expand-dabbrev
        try-expand-dabbrev-all-buffers
        try-expand-dabbrev-from-kill
        try-complete-file-name
        try-complete-lisp-symbol))

NOTE: Hippie exand will probably not work with pabbrev, because pabbrev is an emacs minor mode.

Justin Tanner