Inspiration for this guide is Errichto
You can setup Geany for Competitive Programming using Linux setup for Competitive Programming (with Geany)
To setup Geany Templates in Windows_10 follow steps below :-
You can't Edit/Add Geany template files in Windows using File explorer because of UAC
Follow the steps below to Add/Edit/Delete:-
- Open Powershell in Elevated privileges
-
Navigate to the Geany Template files location using the cd command
If your Geany installation location is in 'Program Files (x86)', type
cd p
then press the tab couple of times until you see your directory and pressEnter
Pressing theTab
Key will autocomplete the current File/Folder name.
- Creating/Editing/Deleting template files
To Create a new template file, use New-Item filename.extension
Format. There is -
(minus) symbol between New and Item
Like I have created mine using New-Item cp. cpp
To delete use
del filename
You can press Tab
to autocomplete
- Editing File
Notice the length of the file created is 0, which means it doesn't contain anything yet.
Type the first few letters of the file and press Tab
and Enter
Pressing the Tab
key will autocomplete the File/Folder name matching.
Your file will be opened in Default Editor/IDE you've specified.
-
Editing Template
Follow Template Customization Guide
Don't be scared; it's just a few paragraphs you need to read to customize
You can add basics like these for a basic template like mine.
Which will be rendered like this in Geany
-
Creating New File from the Template
Click on the dropdown button to the right of the
New
Button or GotoFile -> New (with Template)
and click on your custom template.Voila! Make sure to save your file either from the
File
Menu option orCTRL + S
and give your file a beautiful name