< Return to Video

Emacs Rocks! Episode 06: Yeah! Snippets!

  • 0:00 - 0:03
    welcome back to emacs rocks
  • 0:03 - 0:05
    it's episode six
  • 0:05 - 0:07
    and today we're gonna look at yasnippets
  • 0:07 - 0:11
    it's pretty much a port from TextMate, except ...
  • 0:11 - 0:15
    *even more rocking!*
  • 0:15 - 0:20
    like TextMate snippets you can expand a mnemonic shortcut
  • 0:20 - 0:22
    you also get placeholders
  • 0:28 - 0:31
    and like TextMate you can mirror fields
  • 0:31 - 0:33
    and even transform them
  • 0:33 - 0:35
    check this out
  • 0:35 - 0:37
    it strips off the directory
  • 0:37 - 0:41
    and even camelCases the var for me
  • 0:46 - 0:48
    so, TextMate can do all this
  • 0:48 - 0:50
    it even looks a lot like TextMate,
  • 0:50 - 0:53
    you've got placeholders and stops
  • 0:53 - 0:56
    but check out this mirror field
  • 0:56 - 1:00
    I've embedded lisp directly into the snippet
  • 1:00 - 1:03
    it strips off the directory
  • 1:03 - 1:05
    it camel cases
  • 1:05 - 1:09
    here, TextMate uses *regular expressions*
  • 1:09 - 1:12
    with yasnippets, you get the power
  • 1:12 - 1:17
    and the functional fingerlickingly good lispness with your snippets
  • 1:17 - 1:20
    nice!
  • 1:20 - 1:24
    so let's see that again
  • 1:26 - 1:30
    hah, sweet
  • 1:30 - 1:32
    that was episode six
  • 1:32 - 1:35
    you can check out my snippets on the github repo
  • 1:35 - 1:37
    there's a link on my site
  • 1:37 -
    and for more @emacsrocks, follow me on twitter
Title:
Emacs Rocks! Episode 06: Yeah! Snippets!
Description:

http://emacsrocks.com - Rocking emacs tricks and tips screencast.

Follow me on twitter: @emacsrocks

more » « less
Video Language:
English
Duration:
01:41
magnarsveen added a translation

English subtitles

Revisions