Template plug-in…

icon-pls-s A while ago I created a plug-in for PL/SQL developer that allowed me to type in a short code, press a magic key and have the short code replaced by the contents of my template. For instance, I type put, press CTRL-J and the code I typed in gets replaced by dbms_output.put_line();. That’s a lot less keystrokes. Then problem with this plug-in was that it was not case sensitive. Typing put or PUT resulted in the same template being applied.

I wanted to make the template searched more flexible and dependant on the case of what is being typed. For instance ei (end if;) should be different from EI (END IF;) or Ei (End If;). The problem is however that the ini files used to store the templates are not case sensitive. So, I decided to add a hash value to the template code to make it unique, even to the ini file.

I found an existing function here to hash a string to an integer which I use. This is used to add a hash value of the template to the code-value pair in the ini file. Since I have been using this plug-in  myself for quite some time, I have some templates that I have grown accustom to. It would be a drag to recreate these templates so I decided to create an ini file converter to add the hash value to the existing entries

The template plug-in can be downloaded from this page. Here you can also find the converter, if you had an older version of the plug-in installed, you can also download the converter here.

Leave a Reply

Your email address will not be published. Required fields are marked *