Wednesday, April 13, 2011

How to use code templates to enter keywords without mistakes ?

After my "FlashBuilder tips and tricks" session at 360Flex where I erred while entering "implements" keyword I thought through it and came up with this. Add the following code template with any name it suits you. I used "kw".

${keyword:values(public, protected, private, function, implements, var, try, catch, class, interface, package)} ${cursor}

Now where ever I need to enter a keyword I just need to type "kw" and hit Ctrl+Space to get a popup showing all the keywords. (Note: Modify the list of keywords to suit your need)


Mic said...

(totally off-topic) .. you were the only one that helped users with OLAPDataGrid ( a totally under appreciated class) ... I am down in the depth of mdx and ODG ... is there any way to open a dialog with you? As always TIA,


Sreenivas said...

You can write to me sreenivas.ramaswamy at gmail dot com.

It has been really a long time ago that I worked on OLAP. I hope I can help you out.

Robert Hill said...

If you use camel case or Proper Case when naming your variables and then always type them in lower case when entering code, this will alert you to typos in entering your variable names. If the editor doesn't change it to Proper Case/camel case, then you know you typoed the variable name. This site always helps me in my different custom essays. This has saved me a lot of grief.