"Code Templates" how to add new template? lazarus / 11-Options ---------------------------------------------------------------------- rabiuls · 2014-03-24 09:19 Hello, Greetings to all. I am using Lazarus, version 1.0.12. I want to know the correct procedure to add a "new template" to the "Code Templates", which can be found inside Tools menu. I have read this page: http://wiki.lazarus.freepascal.org/IDE_Window:_Code_Templates I could not understand how to do it, specially the line: "In the source below fill in " I could not found anything like "source" box. For example, I want to create a template for "ShowMessage('');", the token would be say "sh". Now when I type sh and press CTRL+J, it should insert ShowMessage('');. I don't know if I was able to describe what I want correctly. If so, please let me know if should give more information. If anyone has a solution, please let me know. Kind regards, Rabiul. ---------------------------------------------------------------------- howardpc · 2014-03-24 10:30 Quote from: rabiuls on March 24, 2014, 10:19:41 amI could not understand how to do it, specially the line: "In the source below fill in " I could not found anything like "source" box. Your Code Templates dialog is not showing at its full extent for some reason (Lazarus IDE layout is sometimes a bit buggy). Drag the bottom of the dialog downwards to reveal the edit box you need. Then it is straightforward to add the text "ShowMessage('|');" that you require. ---------------------------------------------------------------------- rabiuls · 2014-03-29 04:25 Very sorry for the delay of my response, I was out of home. And many thanks to howardpc. I followed his instruction and it worked. I dragged the bottom of the "Code Templates" window, and found a 'Memo' box, pasted ShowMessage('|'); here and it worked . Thanks to all. Best regards.