Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Meesayen

Hi Dominic, I was thinking if there will be any chance you would share with us your Komodo snippets/abbreviations. Of course I could make my own, but I thought "why not ask Dominic, he should have plenty of them" :P
Anyway thanks, you're doing a great work. Hope to see more and more coming. Oh, I wish to suggest you to create a Plugin section on this web page. Would be great.

1 decade ago by dominic

I only use these three simple snippets:

Defining a module (igm):
ig.module(
	'[[%tabstop:name]]'
)
.requires(
	'[[%tabstop:requires]]'
)
.defines(function(){

[[%tabstop:]]

});

Defining a class (igc):
[[%tabstop:classname]] = ig.Class.extend({
	init: function() {
		[[%tabstop:]]
	}
});

Defining an Entity (ige):
Entity[[%tabstop:Name]] = ig.Entity.extend({
	type: ig.Entity.TYPE.NONE,
	checkAgainst: ig.Entity.TYPE.NONE,
	collides: ig.Entity.COLLIDES.NEVER,
	
	size: {x: 8, y: 8},
	
	animSheet: new ig.AnimationSheet( 'media/dummy.png', 8, 8 ),
	
	init: function( x, y, settings ) {
		this.parent( x, y, settings );
		this.addAnim( 'idle', 1, [0] );
	}
});

1 decade ago by Meesayen

Thanks.

1 decade ago by klodio

Guys, I don't know if anyone is using Vim around, but I'll just leave that here:

au FileType javascript inoremap igm<Tab> ig.module(<CR><CR>).requires(<CR><CR>).defines(function(){<CR><CR>});<Esc>5kA<Tab>
au FileType javascript inoremap igc<Tab> =ig.Class.extend({<CR>init: function(){<CR><Tab><CR>}<CR>});<Esc>4kI
au FileType javascript inoremap ige<Tab> =ig.Entity.extend({<CR>type:ig.Entity.TYPE.NONE,<CR>checkAgainst:ig.Entity.TYPE.NONE,<CR>collides: ig.Entity.COLLIDES.NEVER,<CR><CR>size:{x:8,y:8},<CR><CR>animSheet: new ig.AnimationSheet( 'media/dummy.png', 8, 8 ),<CR><CR>init: function(x,y,settings){<CR>this.parent( x, y, settings );<CR>this.addAnim( 'idle', 1, [0] );<CR>}<CR>});<Esc>13k0i<C-R>=expand("%:t:r")<CR><Esc>0guw~l<Esc>IEntity

Add those to your .vimrc to add this type of bindings to your favorite editor.

I'll update my gist at https://gist.github.com/2946939 when I have time to add some more snippets.
Page 1 of 1
« first « previous next › last »