3

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.

Jonathan Arkell
  • 10,526
  • 2
  • 24
  • 32

2 Answers2

4

I use hippie-expand to manage tab expansion packages.

The following code will try each package in order to expand your tab key press:

(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-expand will probably not work with pabbrev, because pabbrev is an emacs minor mode.

Justin Tanner
  • 14,062
  • 17
  • 82
  • 103
2

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

jfm3
  • 36,964
  • 10
  • 32
  • 35