Have you ever noticed that by default there’s a Templates folder in your home directory? In some file managers, there’s an item in the right-click menu to “Create empty file” or “Create new file”. However, Files (also known as Nautilus) lets you create not only simple empty files, but, as the folder name suggests, templates of many kinds of files.
How to create an empty file template
To create a simple empty file template, make an empty file in the Templates folder (~/Templates). Create the empty file with your favourite text editor, or use this command:
Now, right click in a blank part of the window. The new item New Document is now visible, with your EmptyFile template ready to use.
You can also use a LibreOffice app — such as Writer — to make a template. Create an invoice, or a letter template, with your heading, name, address, and other content always present in your invoices or letters. Save it in the Templates folder with a name like BlankInvoice.odt. Once saved in the Templates folder, you can use the template from the context menu.
Other template ideas
You’ll find a collection of templates here on gnome-look.org, which you can use as a starting point or source of inspiration. Some other template ideas are:
- Create a script template, with the shebang (#!) in the first line, and a header with license, author and so on.
- Perhaps you like static web sites, and don’t want to use static site generators like Jekyll. Instead, create HTML templates for your web pages, pre-filled with headers and other tags.
You can also organize your templates in subfolders. To do this, create subdirectories in the Template folder. This way you can have your templates split up by topic or usage.
If you use a language other than English, the Templates folder name is localized. However, if you have deleted it, or can’t locate it, use the following command to get the location of the template folder:
Tip: If you create a template of an empty archiver file (zip,tar.gz,etc) then you can easily drag-and-drop files onto it and they will get added. So it’s an easy way to create zip files without launching file-roller.
Alessio, good day.
Your first (initial explanation) did not provide enough details. You did not mention using the alternate mouse button (right button). Doing the alternate button press allowed me to slide the mouse pointer to “New Documents” from within the Nautilus display.
After clicking with the right mouse button I obtained some results. With the right mouse button one clicks on “New Document” which causes the Templates folder icon to appear.
Clicking on Template opens up the Templates folder. From that part forward from your document your explanations using “LibreOffice” applies.
Thank you for this information.