I used to create new blank files in Nautilus (Files) using the right click context menu. It really saved me a lot of time. Since Nautilus 3.6, there is no such entry.
Is there a way to create a new blank file in Nautilus 3.6 and above?
Well, I filled a bug report on bugzilla.gnome.org and I feel stupid now... This feature still exists.
The solution is to create a blank file named for instance new inside the ~/Templates/
folder of your home directory.
→ On non-English installations, the templates directory might have another name. One can find the actual directory with
xdg-user-dir TEMPLATES
.
If you're still facing the problem, Check the file in ~/.config/user-dirs.dirs
if XDG_TEMPLATES_DIR
variable is set correctly. If it is set to $HOME/
instead of $HOME/Templates/
, correct and save that file.
XDG_TEMPLATE_DIR
variable in ~/.config/user-dirs.dirs
being set to $HOME
rather than $HOME/Templates
.
New document
menu at all when the Templates folder contains no files even though a possibility of creating an Empty document
clearly exists (the last position in above mentioned context menu)?
Just create some file templates in your home Templates directory:
XDG_TEMPLATES_DIR=$(xdg-user-dir TEMPLATES)
cd "$XDG_TEMPLATES_DIR"
touch 'New Text File.txt' && touch 'New Word File.doc' && touch 'New Excel Spreadsheet.xls'
Go to any folder then, right click and you will see the "New Document" option with the templates you created.
The name of the file must be Untitled Document In Ubuntu 20.04
touch ~/Templates/Untitled\ Document
This works for me
I can't really find this option in 3.6 either, but there are command line tools that can help you out (but it depends on what you are actually trying to accomplish here).
In a Terminal (CTRL+ALT+T) you can write the command:
touch filename.ext
This will create an empty file called filename.ext - you can call it whatever you want, with whatever extension (or no extension) you feel like.
This guy saved me. Just put an empty file in ~/Templates/ and you'll see an ability to duplicate it into any folder when you right-click and do into "New Document".
I guess you could write a nautilus script with touch "New files.txt"
in it.
You could even keybind it using accels.
I installed nautilus-terminal
.
It gives you a small embedded terminal inside Nautilus.
The directory in the embedded terminal is identical to the directory you are watching in nautilus.
So you can use the touch
command there without opening a separate terminal and changing directories manually.
To get back this functionality, I've written a simple guide http://bernaerts.dyndns.org/linux/344-nautilus-new-document-creation-menu to setup a customized right click contextual menu in Nautilus that allows you to create some empty documents fitted to your need.
For every document in the menu, you can set :
To allow this level of customisation, setup follows 3 steps :
This is supposed to provide a generic approach and to give some flexibility.
Hope it helps.
If you're on a localised Ubuntu version, you need to find the right translation for "Tempaltes". For example, on my French Ubuntu 20.04 version, "Templates" is called "Modèles"
I use the create dopcument all the time in my www folder. unfortunately it seems to be broken when I upgraded to 14.04LTS. The Templates folder is missing in the root's home directory.
so this is how I fixed it. in my Templates folder in my home folder (you have to show hidden files btw) navigate there and for some reason it worked there. I right clicked and added the new document then I Right clicked and made a new document but I tittled the next one as newphp.php and another as newhtml.html
I edited both docs and included my default codes I used.
then I opened up a terminal and typed: gksu nautilus on the command line then navigated to the home directory that my computer boots into (default account), then copied the Templates folder (that I just made additional new files in ) then navigates to the root's home by clicking home in the nautilus menu that I launched as root, and paste the Templates folder in the root's home directory.
gedit &
in terminal, write stuff in it and Ctrl+S to save. If you want to get feisty, in the terminal, typevim
which is a lot more complicated than gedit. Terminal-> Ctrl +Alt+T:P
Just finishing my dissertation...What I actually do in that case isexport curv=/home/username/Research/Dissertation/Draft/Curvature_effects/dftdata
and thencd
to say $curv and so on. I save all these file paths in a text file. You could perhaps put them in your.bashrc
file (I've done that as well). Does save time...