Tempate or HotKeys? Can Inserting Commit be made easy with IntelliJ
I have a question about IntelliJ and I dont know if the following can be done with Temapaltes or Hotkeys or something. As I am coding I like to put in comments in the following format:
/*
/ Date: 02.25.12
/ Author: xxx xxx
/ Email: jxxx
/ Commit:
/ Added the new fields based on request XXX.
/
*/
Can I somehow setup a easy way with IntelliJ to press a key or something to insert this into my code
Please sign in to leave a comment.
Hello,
That's called live templates at our domain. Please check the corresponding reference section.
Denis
thanks. I created alive template but I dont see how I can make it insert the date and time from the system?
I found it..
You can create your own:
Now when you type "date" and use the default completion gesture (Tab) it will replace "date" with the current date.
Oh, sorry, I mixed Live Templates and File Templates - the later has {DATE} binding.
I think you can create a simple plugin which has a single action which provides that template text with necessary arguments. Alternatively you can try this scripting plugin - intellij-eval for achieving that.
Denis
Oh, there is an existing date() binding at live templates, cool ;)
Denis
yes