FreeMarker live template for IntelliJ; small update
Looking for a reason to test the integration of the FCKeditor with my Pebble powered blog, explained in detail here, I reviewed a bit my old but somehow useful ;) FreeMarker templates.
Working with IntelliJ 5.0, I discovered some minor problems while trying to update the template file. IntelliJ 5.0 is not accepting anymore special characters as template abbreviation. Therefore, the only way to edit the FreeMarker templates is to use a text editor; IntelliJ needs to be stopped while working on the FreeMarker.xml template file!
I am not sure if this is a bug .. or feature, but right now, if you want to change the FM templates, this is the only method I found. Let me know if you'll find a better solution.
So, if you're using IntelliJ 5.0 (if not, why?:) and want to use the FreeMarker templates, download this file and install it as described on my previous post.
Ahaaaa, I forgot, for IntelliJ5.0, I defined a custom file extension for .ftl and I mapped the templates to "Other" context, which means that the FreeMarker template will be enabled for all files with extension registered in IDEA under text file type.
Enjoy the taste of FreeMarker in your preferred IDE ;)
Cheers,
-florin
________
PS
- the template file contains a new macro (the FM comment, type <#-- and tap SPACE, you'll get the <#-- --> with the cursor positioned inside the comment block) and a small bug fix.
Working with IntelliJ 5.0, I discovered some minor problems while trying to update the template file. IntelliJ 5.0 is not accepting anymore special characters as template abbreviation. Therefore, the only way to edit the FreeMarker templates is to use a text editor; IntelliJ needs to be stopped while working on the FreeMarker.xml template file!
I am not sure if this is a bug .. or feature, but right now, if you want to change the FM templates, this is the only method I found. Let me know if you'll find a better solution.
So, if you're using IntelliJ 5.0 (if not, why?:) and want to use the FreeMarker templates, download this file and install it as described on my previous post.
Ahaaaa, I forgot, for IntelliJ5.0, I defined a custom file extension for .ftl and I mapped the templates to "Other" context, which means that the FreeMarker template will be enabled for all files with extension registered in IDEA under text file type.
Enjoy the taste of FreeMarker in your preferred IDE ;)
Cheers,
-florin
________
PS
- the template file contains a new macro (the FM comment, type <#-- and tap SPACE, you'll get the <#-- --> with the cursor positioned inside the comment block) and a small bug fix.
Re: FreeMarker live template for IntelliJ; small update
Funny, I comment my own comments ;) the reason is: the FreeMarker file type description for IntelliJ5. You can take it from here (580 bytes)
Shutdown IntelliJ, download and unpack the above .zip file on your: ${user.home}/.IntelliJIdea50/config/filetypes and restart IntelliJ.
Your .ftl files should look better now; this file contains most of the FreeMarker reserved words, but if I missed one .. please let me know. Cheers,
Shutdown IntelliJ, download and unpack the above .zip file on your: ${user.home}/.IntelliJIdea50/config/filetypes and restart IntelliJ.
Your .ftl files should look better now; this file contains most of the FreeMarker reserved words, but if I missed one .. please let me know. Cheers,
Re: FreeMarker live template for IntelliJ; small update
Hi Markus,
It depends if your files containing freemarker code have the .txt extension?! On my dev environment, the freemarker templates have .ftl extension, and therefore I had to add a new file type (IDE Settings->File Types) since IDEA doesn't recognize the .ftl files.
I have also mapped my small template lib on .html files. Sometimes I do have html and freemarker together;) But only sometimes and only when forced to use FM;I am a big Velocity fan:)
Let me know if it helps,
Cheers,
-florin
Re: FreeMarker live template for IntelliJ; small update
and another update in case you need it: the FM file type definition, where I declared the basic FM reserved words so you can have a simple FM syntax highlighter. Attached to the same zip.
After you unzip the files, please copy the files attached to your IDEA config path as follows:
ftl.xml ==> config/filetypes
FreeMarker.xml ==> config/templates
On a Windows box most probably that the config is somewhere like this:
C:\Documents and Settings\your_username\.IntelliJIdea50\
:)
After you unzip the files, please copy the files attached to your IDEA config path as follows:
ftl.xml ==> config/filetypes
FreeMarker.xml ==> config/templates
On a Windows box most probably that the config is somewhere like this:
C:\Documents and Settings\your_username\.IntelliJIdea50\
:)
