jdonaldson/vaxe

Using snippets

Closed this issue · 1 comments

Hi Justin :)

Haxe can be a bit verbose sometimes, for example:

public static function ...

Does vaxe include snippets for portions of code like that?

Cheers!

  • Marcelo.

Sure, I'm working with vim snipMate right now. You'll notice that there's a directory for snippets in vaxe. They should all work automatically if you install snipMate or any of the snippet plugins.

I have a funny sounding scheme for my snippets:

pustafu -> public static function name(arg){...}
pufu -> public function name(arg){...}
fu -> function name(arg){...}
fn -> function(arg){...}

There's probably shorter snippets, but it's easier for me to remember, and avoids conflicts.

Snippets are really easy to write, and can be very useful. But, I don't like including a lot of them because they start conflicting with each other (and then you have to use a menu to select which one you want). So, I like shorter ones for general purpose use, and longer ones that are more specific to certain cases (e.g. targets in Haxe)

If you come up with some (on your personal fork) let me know.