all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Including Yasnippet to Emacs
@ 2014-03-17  4:10 Danil Orlov
  2014-03-17 14:45 ` Stefan
  0 siblings, 1 reply; 9+ messages in thread
From: Danil Orlov @ 2014-03-17  4:10 UTC (permalink / raw)
  To: emacs-devel

I know that everybody want to push to Emacs standard distro something what he needs. But snippets is another
question - it is too wide used technology to be ignored. Sublime Text Editor, TextMate has it, all Jetbrains IDEs has it, I even
think that every IDE nowdays has it. That's bad argument, but I have another one - lots of modes creates its own wheel to support snippets.

html-mode uses own snippets for tags
web-mode uses own snippets "C-c C-s"
markdown-mode uses own snippets for headers

and that's only modes I use.

I think that if Emacs will have unified mechanism for managing snippets, it will be useful not only for end users, but also for mode creators. 
And those snippets-for-each-mode also steal keybindings. And many of us uses Yasnippet too, so we in fact always have two different snippet engines.

Of course now Yasnippet probably a bit clumsy for usage via API. Maybe something like this must be supported, to migrate mode snippets easily.

(yas/api-add-snippet 
                     "html-mode"   ; mode
                     "h1"          ; name and key
                     "C-x n 1"     ; keyboard shortcut
                     "<h1>$1</h1>" ; snippet body
                     )

So you, as mode author, must not think about bindings, creating function for each snippet.

What do you think about it?



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-03-17 21:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-17  4:10 Including Yasnippet to Emacs Danil Orlov
2014-03-17 14:45 ` Stefan
2014-03-17 14:53   ` joakim
2014-03-17 17:15   ` João Távora
2014-03-17 17:42   ` Danil Orlov
2014-03-17 19:36     ` Stefan
2014-03-17 20:23       ` João Távora
2014-03-17 21:12         ` Danil Orlov
2014-03-17 21:09       ` Danil Orlov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.