Hey there,
I changed the title of this thread since we changed the topic. (:
rch wrote:
60840A_Geanyusers.txt 10.11.2015 08:00:43 CET
Thats magic (see above two lines)
Yeah, I've been having quite a bit of fun with them, too. (:
Question:- Does this only work with template files that are empty except for the two lines {untitled} {date} ?
Not at all. Check out all the wildcards here:
http://www.geany.org/manual/current/index.html#templates
At least one of them has a requirement (the filename wildcard must be in the first four lines of the template or it won't work), and you can read the descriptions of each one to find out more.
I see you're using GNU/Linux (if this were Windows, a different command would need to be used below to get your username), so try this template:
Title: {untitled} Date: {date}
Hello world!
This template was written by {command:whoami} and has been brought to you from within {geanyversion} for your viewing pleasure.
I tried adding those two lines at top of my existing Perl template text.pl which is 240 lines long. The new Perl file opens with the date already nicely filled in; it looks like this untitled 10.11.2015 08:11:12 CET #!/usr/bin/perl ...snip... But when I save it using same procedure as for the txt file, the top line "untitled" does not change at all.
That might be because you bumped the hash line (the one starting with #) down two lines. That needs to stay at the top of a perl script because that's where the system looks to try to find out what kind of file it's opening.
I'm not sure if your modification of that file would work if you moved the first two lines below the hash line, but I'm out of time this morning. I'll check back later today to see how it went, though.
Perhaps I'll need to learn some scripting [1] R
[1]
Note that the mini script interface offers the option to save scripts and load them, and that's really powerful since the sky's the limit on what you can do to a file if you know how to script it. (:
Yes, definitely. It's a blast, and you can start as small as you like and work your way up. If you can script, you can pretty well do anything on a computer. Now you just need to pick which language(s) you'd like to learn. Also, the command wildcard above will allow you to insert shell commands right into a template, so even if you start small and learn one new thing at a time, you can add those things into templates immediately. (: