3

I managed to add a text file to the templates after looking at this post: How to create a new empty file / template file in Ubuntu 16.10 Desktop?

But, it creates a text file with the name provided.

Is it possible to create a new file, and then immediately after you create it, make it already in the renaming session? Just like when you right-click and create a new file on Windows

Foobarer
  • 367
  • 1
  • 8
  • 16
  • 2
    Seems like it would be much less convoluted and confusing to simply provide the correct filename at creation time. It's unclear why you want to add extra steps and deliberately create a file with the wrong name. – user535733 Jun 20 '22 at 21:13
  • But how? The right-click menu for creating text files did not exist if I did not add it to Templates. And then I had to make a template with a certain file name. Or there is a better way to do it? – Foobarer Jun 20 '22 at 22:15
  • This is starting to look like an XY Problem. Let's back up. What exactly are you trying to accomplish by creating blank text files in the Templates directory using the File Manager? What goal is that a step toward achieving? What's the REAL problem that has led you down the path to thinking that creating blank text files is a great solution? – user535733 Jun 20 '22 at 22:24
  • Hahahah ok so I am used to creating blank text files on Windows and renaming them to <some-name>.php, I just got used to creating files like that :D – Foobarer Jun 20 '22 at 22:58
  • You should edit the question and limit it to Nautilus, because other file managers do this by default, like for example Dolphin. – cipricus Jun 21 '22 at 10:43

2 Answers2

4

Is it possible to create a new file, and then immediately after you create it, make it already in the renaming session?

No. It would require writing a little nautilus script or python extension to achieve this, if one does not yet exist.

The right-click menu allows to create the file. The rename action is a separate step. A quick way to start the rename process is to hit F2.

The feature was requested, but no developer took interest in implementing this thus far.

vanadium
  • 88,010
  • 2
    Gnome never ceases to amaze me (and I never use it!). All other file managers have this. – cipricus Jun 21 '22 at 11:07
  • Ah, that's sad :/ – Foobarer Jun 21 '22 at 20:14
  • @BGWay - I find Nautilus very limited and while on Gnome I cannot recommend at all the most complete file manager ever (Dolphin -- rather than getting all those dependencies better switch to Kubuntu) I could suggest Nemo - which comes with some Cinnamon elements but they are not too many and it stays within the GTK feel. Nemo also has split view (another great feature that is heresy in Nautilus). – cipricus Jun 23 '22 at 07:40
4

I imagine that what you want is something like this, upon selecting the option to create new file:

enter image description here

And if what you mean is Gnome and its default fie manager Nautilus, then Nautilus is rather the exception than the rule in not having this feature, as said in the other answer.

Dolphin (Plasma/Kubuntu) has that, as well as all the other file managers that I have tested out of curiosity (ALL!!): Thunar, Index, Caja, PCManFM, Nemo, Konqueror...

cipricus
  • 3,444
  • 2
  • 34
  • 85