I use Geany for coding. Everything is fine & OK. But I want to load my template file from the terminal. Because copy pasteing everytime form anthoer file or opening template from dropdown menu is too much work in contest time. I added my custom template in this directory ( ~/.config/geany/templates/files/ ) but after doing so, when I type -> (geany 1.cpp &) on terminal, template file is not loading.
I tried to find the configuration in internet. But I got nothing about it & template documentation is just about adding another file in the dropdown menu so, it's not helpful. But I saw Errichto doing it all the time while streaming. His template is loading when he open a file from the terminal.
So, anyone who use Geany. Can you tell me about this configuration? That would be much help.
I've created a script for the template copying. If file exists, doesn't overwrite but open it. Else it creates a copy of your template then opens it.
See if it helps. Link
Well, you can just make a
template.cpp
file and gocp template.cpp problemname.cpp
every time you solve something. At least that's what I do.You can make some script like
and you can for example just in terminal do
it will create a file called
A.cpp
contains whatever it is in your template and then open it using geanyActually, you need to make it executable before using
./scrip_name
So, all you need to do is just
chmod +x script_name
at first to give the file an executable attribute.I believe you can also just do
bash script_name
and it will work completely fine.