Available macros in code templates lazarus / 11-Options ---------------------------------------------------------------------- wimpie · 2009-10-28 18:40 Hi all I want to create a code template that will insert the date and the filename upon creation of the template. The date I managed using $Date(). Is there a way to get the file's name? ---------------------------------------------------------------------- Vincent Snijders · 2009-10-28 19:47 See: http://wiki.lazarus.freepascal.org/IDE_Macros_in_paths_and_filenames I guess EdFile can be used. At least I hope that these macroes are available in the code templates too. ---------------------------------------------------------------------- Vincent Snijders · 2009-10-28 19:49 Hmm, it seems to a different list of macros. Maybe somebody on the Lazarus list has an idea, otherwise it is a new feature request. ---------------------------------------------------------------------- Vincent Snijders · 2009-10-28 19:55 Maybe you can use {$I %FILE%}: http://www.freepascal.org/docs- html/prog/progsu38.html ---------------------------------------------------------------------- wimpie · 2009-10-29 16:47 Thanks for the ideas. Those macros only get expanded at compile time. The list of macros that get expanded during template insertion is quite short. I will add this as a feature request in Mantis.