From: Jeroen B. <je...@li...> - 2005-01-25 21:20:13
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 A few days ago i discovered abbreviations and i really like them! (shift+space is a very good shortcut for it imho). Until now i only used it to expand simple abbreviations but now i started to wonder if i could use it in a more powerful way, and yes ofcourse that's possible :), by using 'Positional parameters' (reading a manual can sometimes be very useful :D ). So i created an abbreviation: function#my_function($param1)# which is expanded to: /** * function description * @param type $param description * @return type description */ function $1 { } This already looks very good, but it would even be more powerful if the expanded abbreviation could also automatically fill in all the phpDoc's. Ofcourse it would be possible to create an abbreviation like function#function_name#param1#param2#param3# which could expand to /** * function description * @param type $2 description * @param type $3 description * @param type $4 description */ function $1($2, $3, $4) {} but the problem is that not every function has three params.. Maybe a next version of jEdit could make it possible to use some sort of regexp's in the abbreviation parameter or something like that? (i currently don't know much about regexp's, although i really want to learn using them, so maybe this is is all not possible?) Or should i use the templates plugin to do such things? thx!, Jeroen - -- <TeRanEX/> --- e-mail: je...@li... - jid: te...@ja... --- blog: http://budts.be/weblog/ - cv: http://budts.be/jeroen/ --- projects: http://lightyear.be - pgp: 0x8B7B774A _____________________________________ NO SoftwarePatents in Europe! See an example: http://webshop.ffii.org/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB9rgQH04wF4t7d0oRAtPDAJ9sGGVlcynK4cu7UiECeMJ6kohLjgCfY65E EJOOIbOEw31IzIQVYi95grI= =PhPI -----END PGP SIGNATURE----- |