Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicts with Yasnippet tab functionality (I think) #1

Open
mwilliams opened this issue Oct 22, 2009 · 7 comments
Open

Conflicts with Yasnippet tab functionality (I think) #1

mwilliams opened this issue Oct 22, 2009 · 7 comments

Comments

@mwilliams
Copy link

I heavily rely on Yasnippet for working with snippet completion and smart-tab conflicts and removed the Yasnippet tab functionality.

Still very much a novice when it comes to hacking elisp so I can't quite figure out how to work it in.

It appears yas/expand gets called to do the expansion, so I guess that would needed to be added into the chain somewhere?

@haxney
Copy link
Owner

haxney commented Oct 23, 2009

Thanks for the report! I'll look into it and get back to you.

I don't use YaSnippet (though I have heard good things about it), so could you tell me what command YaSnippet binds to when smart-tab is not activated (C-h k )? Part of what smart-tab does is try to replicate Emacs' keybinding lookup mechanism, so knowing what should be called will help.

Thanks again for the report!

@haxney
Copy link
Owner

haxney commented Oct 23, 2009

Oh, and I almost forgot, could you give me your Emacs version, what OS you are using, and try using Yasnippet and smart-tab without any other customizations. You can do this by running Emacs with:

$ emacs -Q

and then loading yasnippet and smart-tab manually.

@mwilliams
Copy link
Author

I'm running the build from http://emacsformacosx.com/ (in OSX Snow Leopard). The about says 23.1 (9.0).

And actually, I've seen to have done something to completely destroy any tabbing at all! I've commented out Yasnippet so I'm only loading smart-tab with:

(load-file "~/.emacs.d/vendor/smart-tab/smart-tab.el")
(require 'smart-tab)

So I'm really scratching my head right now and I may need to go back a few commits to find where I broke the functionality altogether.

But my .emacs file is here if you want to take a peek: http://github.com/mwilliams/emacs/blob/master/mwilliams.el

It's really nothing special, I started with the emacs-starter-kit but started from scratch and only implemented the functionality I needed. It's been fun and this has been my first week working only in Emacs and not touching TextMate. I'm really beginning to appreciate Emacs a lot, mostly to great additions like yours (when I had it working! haha). And I'm the one you responded to on StackOverflow the other day in regard to the smart-tab question :). So Thanks!

@jney
Copy link

jney commented Jan 16, 2011

Hello, i've got the same problem, i think.
I'm using smart-tab and i like it, and i'm using yasnippet that i like too.
the problem is, that when i use them together yasnippet doesn't work anymore.
any idea how to fix it ?

@marciomr
Copy link

marciomr commented Sep 8, 2011

Smart-tab + yasnippet would be great.
I guess it shouldn't be that hard. Before calling hippie-expand it should call yas/expand in yas/minor-mode.
I tryed to change the file, but it didn't work :-(

@marciomr
Copy link

marciomr commented Sep 9, 2011

I got it. It is much easier to configure hippie-expansion to be compatible with yasnipet and then using hippie-expansion with smart-tab.

in the .emacs file add

(add-to-list 'hippie-expand-try-functions-list
'yas/hippie-try-expand) ;put yasnippet in hippie-expansion list

(setq smart-tab-using-hippie-expand t)
(global-smart-tab-mode t)

@xumingming
Copy link

+1 for @marciomr 's solution, works for me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants