senny / cabbage

get the maximum out of emacs
http://senny.github.com/cabbage/
156 stars 21 forks source link

Snippets bundle #88

Closed fred-o closed 12 years ago

fred-o commented 12 years ago

Hi, I've added a code snippets bundle (using yasnippet), thought it could be useful. User-defined snippets are kept in ~/.emacs.d/snippets

Cheers, -- Fredrik

senny commented 12 years ago

Thanks for taking this up again. We already had a snippet discussion way back when the project started at: #15 but I guess we lost sight of it so its nice to see the issue back. Back then I wasn't sure if we should make snippets available as a bundle or rather make it a first-class-citizen which is setup with e-max core. This would allow other bundles to use a snippet-wrapper defined in e-max core. I guess we can do kinda the same thing with e-max-bundle-active-p so I'm fine with either way.

@jone what do you think?

jone commented 12 years ago

I think having a snippet solution is important - I was asked several times now. A flexible solution which supports multiple systems (ysnippet, skeleton mode, etc), will be very nice, but I'd for now just use yasnippet since it's implemented here already. We can change it later if we have implemented THE solution ;-)

yasnippet conflicts with org-mode: http://orgmode.org/manual/Conflicts.html , maybe we need to take a look at it and check if it is a problem for us. In my emacs config before e-max I used to have both active and org-mode used to crash emacs sometimes - but I'm not sure if it was this conflict.

How does yasnippet bind TAB now? I think we should take a look at this and review it carefully since we already rebind TAB in e-max and use it for several other use-cases..

senny commented 12 years ago

@jone agreed. we should ship a solution for the time being and we can alway change it laters. I'll have a look at the changes when I got some free time and verify that it works with my setup. Can you verify the changes for python and your settings?

jone commented 12 years ago

@senny I will @fred-o could you merge the current master of senny/e-max to the branch? The eclim bundle merge is not yet there..

fred-o commented 12 years ago

FWIW, I've been running yasnippet along with org-mode for about two years without any problems. It also works with auto-complete-mode, even though they booth bind to TAB, but there are some annoying kinks.

I'll see about merging the senny's branch into this one as soon as I get a chance, but I'm travelling until sunday. Last night's commit was made in-flight :)

jone commented 12 years ago

I've added the path expansion and creating the default snippets directory in ~/.dotfiles/snippets. Thanks @fred-o :)