In Finder > Select a folder > Right click, we get a popup with an option to create a new folder:
Is there a way to add menu item
New Textfile for adding a new text file?
You could assign a shortcut to a script like this:
There is a bug in 10.7 and 10.8 that affects many other scripts and Automator services like this. Finder ignores new windows when getting the
So neither of these ways of checking if the desktop is selected work reliably:
You could also wrap the script as an Automator service, but there is another bug where the shortcuts for Automator services don't always work until you hover over the services menu from the menu bar. If the input type was set to no input, the service wouldn't show up in context menus. If it was set to folders or files, you'd have to always secondary-click some folder or file.
I didn't vote to close this question, because many of the solutions in the other questions are affected by either of the two bugs mentioned above. We'll likely get even more questions like this, which could then be closed as duplicates of this question.
I am using XtraFinder plugin for Mac OS's built in Finder. It has most of the features including create new file in finder options.
You'll love it like I do
Edit: I couldn't get the above working as a Service but then I found a dialog hiding behind everything else where Finder was asking for permission to use the accessibility features. Once I'd enabled that the answer from Lauri Ranta worked. But the one below works well and doesn't need extra permissions.
I've tried several ways, the cleanest I've found is the Automator script provided here:
And available from Github here:
There is a little known feature of the Finder called Stationary Pad. Imagine having a pad of paper that you could "tear off" a new sheet from on your desktop. Each page in the pad could have a custom layout and pre-existing content etc, allow you to (for example) fill in a "while you were out, X called" memo.
I'm not as a Mac at present to get screenshots etc, but if you open up a text document, and then enter the details you want to be used as your template (bearing in mind a totally blank sheet is a perfectly valid template), then save it somewhere, right click and
There is more info if you google, this is a brief summary with helpful commens that isn't too old.
This isn't quite right clicking on the desktop and clicking "New File", but if your template icon is on the desktop it's arguably faster (depending on if you are faster at locating an icon and double clicking, or using any white space, right clicking then choosing from a context sensitive menu...)
Alternatively, you could use a combination of one of the scripted methods shown in other answers to get them to simply open a Stationary pad file, and you can recreate the "create blank" feature nicely from any App, even ones that don't support Applescript, and the "blank" document doesn't even have to be blank, but can be a template.