View Poll Results: Yet another editor poll. Pick your favorite.

Voters
34. You may not vote on this poll
  • emacs/xemacs

    16 47.06%
  • vi/vim

    2 5.88%
  • eclipse/spket

    5 14.71%
  • aptana

    0 0%
  • komodo

    1 2.94%
  • dreamweaver

    0 0%
  • IntelliJ

    2 5.88%
  • gedit

    1 2.94%
  • notepad++

    3 8.82%
  • other

    4 11.76%
  1. #1

    Default yasnippets -- yet another snippet extension for emacs

    yasnippets -- yet another snippet extension for emacs


    Is anyone using yasnippet for Ext development? I haven't been able to find yasnippets for Ext (or even javascript for that matter) and was about to write some of my own but didn't want to do it if someone else already has.

    If no one has any I will start cranking out some templates and post them to this thread.

    Anyone using emacs, I highly recommend checking out yasnippet, it puts a smile on my face while I code. They've put together a pretty sweet video here.


    ---------------------------------
    updated snippets 12/11/09:
    See attached
    ---------------------------------
    updated snippets 12/23/09:
    Most (all?) of them are working. Added a few more.
    Attached Files
    Last edited by mitch_feaster; 23 Dec 2009 at 8:58 AM. Reason: newer version

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    77
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    I would be interested just to know how many people actually use emacs for Web development. I know it's been around along time and has endured continued success .

  3. #3
    Ext User
    Join Date
    Aug 2009
    Posts
    127
    Vote Rating
    0
    rblon is on a distinguished road

      0  

    Default


    yep, and interesting to know how many are using terminal-only (instead of the fancy GUI from the video)...

  4. #4
    Sencha Premium Member bpjohnson's Avatar
    Join Date
    Jun 2007
    Location
    Atlanta, GA
    Posts
    47
    Vote Rating
    6
    bpjohnson is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitch_feaster View Post
    Is anyone using yasnippet for Ext development? I haven't been able to find yasnippets for Ext (or even javascript for that matter) and was about to write some of my own but didn't want to do it if someone else already has.

    If no one has any I will start cranking out some templates and post them to this thread.

    Anyone using emacs, I highly recommend checking out yasnippet, it puts a smile on my face while I code. They've put together a pretty sweet video here.
    I use both Emacs and yasnippet. I only have two Ext snippets (I use yas for PHP mostly).

    I've included them below, and I'd love to see anything you come up with. Also, there's a python script somewhere for converting Textmate snippets to yasnippets, so if you come across any Ext Textmate snippets, those may be worth converting.

    PHP Code:
    #contributor : Bryan P Johnson <bryan@12ftguru.com>
    #name :  Ext namespace ... 
    # --
    Ext.namespace('$1');

    $

    PHP Code:
    #contributor : Bryan P Johnson <bryan@12ftguru.com>
    #name :  Ext extend ... 
    # --

    var $= function(config) {
        
    config config || {};

        $
    0

        Ext
    .apply(thisconfig);
        $
    1.superclass.constructor.call(this);
    }

    Ext.extend($1, $2, {

    });

    Ext.reg('$3', $1); 

  5. #5

    Default


    Quote Originally Posted by bpjohnson View Post
    Also, there's a python script somewhere for converting Textmate snippets to yasnippets, so if you come across any Ext Textmate snippets, those may be worth converting.
    Yeah I just found that this morning. I'm trying to convert some of Ed Spencer's TextMate Ext bundle now. The conversion script got most of it right but I'm hand-tweaking some of the others that didn't convert correctly. Thanks to Ed Spencer for these templates! I'll post my tweaked versions probably sometime today.

  6. #6
    Sencha - Community Support Team mschwartz's Avatar
    Join Date
    Nov 2008
    Location
    San Diego, Peoples' Republic of California
    Posts
    2,053
    Vote Rating
    17
    mschwartz will become famous soon enough mschwartz will become famous soon enough

      0  

    Default


    Quote Originally Posted by jgarcia@tdg-i.com View Post
    I would be interested just to know how many people actually use emacs for Web development. I know it's been around along time and has endured continued success .
    emacs isn't an editor or an IDE.

    It's the kitchen sink.

  7. #7
    Sencha Premium Member
    Join Date
    Feb 2009
    Posts
    315
    Vote Rating
    3
    azuroff will become famous soon enough

      0  

    Default


    Only Chuck Norris knows everything emacs is capable of doing.

  8. #8

    Default


    Here are some of Ed Spencer's TextMate snippets converted using snippet-copier. I haven't tested a lot of them but the ones I tested either already worked perfectly or required some minor tweaking. I plan on just fixing them as I need them. If anyone else does the same feel free to post the fixes to this thread :-)

    I put mine in mysnippets/espresso-mode
    Attached Files

  9. #9
    Sencha Premium Member bpjohnson's Avatar
    Join Date
    Jun 2007
    Location
    Atlanta, GA
    Posts
    47
    Vote Rating
    6
    bpjohnson is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitch_feaster View Post
    Here are some of Ed Spencer's TextMate snippets converted using snippet-copier.
    Excellent! Thank you!

  10. #10
    Ext User
    Join Date
    Aug 2009
    Posts
    127
    Vote Rating
    0
    rblon is on a distinguished road

      0  

    Default


    Quote Originally Posted by mschwartz View Post
    emacs isn't an editor or an IDE.

    It's the kitchen sink.
    Agreed, you can't do any cooking without it :-)