Is there a way to simply create a new document e.g. on the Desktop and open it with e.g. textmate with a simple shortcut or script. I know that the MS Windows approach where you can just create a new empty txt file directly is not working for Mac. I am looking for a method achieving something similar. Any ideas?
Another way to create a text file is to right-click an empty area on the desktop, and in the pop-up menu, select New, and then select Text Document. Creating a text file this way opens your default text editor with a blank text file on your desktop.
From within Windows, right-click in the area you want to create the file. For example, right-click the desktop to create a new text file on the desktop. In the drop-down menu that appears, select New and choose Text Document.
On your Mac, click the Finder icon in the Dock to open a Finder window, then navigate to where you want to create the folder. Alternatively, click the desktop if you want to create the folder on the desktop. Choose File > New Folder, or press Shift-Command-N.
You can write this in the terminal:
touch filename.txt
Or as a script:
#!/bin/sh touch filename.txt
alt text http://img64.imageshack.us/img64/2280/screenshot20100106at125.png
This uses TextMate's mate
command line helper application.
If it's not installed, go to TextMate > Help > Terminal Usage.
#!/bin/bash cd "$(dirname "$0")" ntf="Untitled $(date +%s).txt" touch "$ntf" mate "$ntf"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With