Question

In Windows, one can create a new file using Right Click -> Add New -> Type of File. Is there an analogous action in Lion?

I just want to create a new blank file on my Desktop.

Was it helpful?

Solution

To-Do's

If you just want to create a To-Do list, you might look at third-party solutions like:

  • NotesTab (free) which 'rests' in the menubar and has a beautiful GUI.

  • Wunderlist (free) which provides sync between OSX, Win, iOS and Android

However, if you want to use a feature provided by OSX, try Stickies. It's Apple's program for taking notes. Very minimalistic and fast.

enter image description here

  • format how you like
  • edit with hyperlinks
  • drag and drop pictures
  • export as *.txt
  • use +N to create a new note
  • use + to create a list within the stickie
    • with right-click you get to customize the list
    • enter image description here

Contextual Menu item

There used to be NuFile which added the Windows-like feature to OSX. Unfortunately, the software hasn't been updated in years. There is commercial solution available now:

Neu

This applications adds "Create Document..." and "Create And Open Document..." menus to various places, including the main menubar, the Dock, and the Services menu that the Finder shows when you right-click on something. You can also trigger Neu from any application using a special key combination.

OTHER TIPS

A simple drag-and-drop solution works for me.

Create a folder called "New documents". In this folder, save a blank document of each type you want. In my case, I have a blank TextEdit document (.rtf) and a blank TextMate document (.txt).

Lock this folder (select, cmd-I, click 'Locked').

Put the folder in the Dock.

Now, whenever you want a new document, you simply drag it from this Dock folder to wherever you want it. Because the "New documents" folder is locked, the original won't be deleted; rather, the Mac will make a copy for you.

Another option is to assign a shortcut to a script like this:

tell application "Finder"
    set selection to make new file at (get insertion location)
end tell

You can also use the Evernote, http://www.evernote.com/, to manage your To-Do list, which can also be synced between devices.

(I just re-read the question and am uncertain whether this post applies. My answer below is a solution for simple To-Do creation. If this question is really about creating a blank text file, though, my solution doesn't apply. Perhaps the original question could be clarified?)

I use LaunchBar, in conjunction with Wunderlist and a little Applescript. This is a fluid action for me now: Cmd-Space, then "AW", Space, and my To-Do text.

For those not familiar with LaunchBar, Cmd-Space brings up LaunchBar itself, "AW" is a shortcut to my "Add to Wunderlist" script, "Space" brings up a text field, and the contents of that field go to my Wunderlist task list.

The Applescript is really simple, it just takes a string and emails it to Wunderlist. It looks like this:

on handle_string(the_string)
    set sendemail_string to "/usr/local/bin/sendemail -f my_email_address@gmail.com
      -t me@wunderlist.com -s "
    set gmail_string to "smtp.gmail.com:587 -xu my_email_address@gmail.com
      -xp myemailpasswordgoeshere -m "
    do shell script sendemail_string & gmail_string & the_string
end handle_string

This script DOES make your email password available in clear text in the script itself. I have a disposable Gmail account that I use only for this purpose, so I'm not that bothered if the account is compromised.

This system may be a bit more technical than many would like, but it allows me to use Wunderlist (which I love). If you're already a LaunchBar user, I think you'll like it too.

If you're not adverse to using a 3rd pary app, then Document Palette sounds like what you need.

EDIT: This looks like its been discontinued by the developer. However, I managed to grab it from here and it seems to work just fine on Lion.

enter image description here

Document Palette, a free application from Cold Pizza Software, gives Windows switchers and long-time Mac OS X users searching for yet another way to save time, the ability to create new documents in the Finder with a quick keyboard shortcut...

Document Palette runs in the background and is invoked by hitting Command + Control + Option + N. Doing so brings up a semi-opaque bezel (much like the built-in Application Switcher) containing document icons from which you can choose to create new documents. By default, a plain text, rich text and HTML file are available, but you can add your own document types simply by dragging a document into the Document Palette application list window.

Neu is a simple application that makes it easier to create new documents in the Finder, without you having to open an application first.

http://www.elegantchaos.com/neu (demo available)

$10 on the Mac App Store: http://itunes.apple.com/us/app/neu/id405033825?mt=12

This script will add an item to your context menu (tested on OSX Mavericks) and is VERY easy to install:

https://github.com/OscarGodson/New-File

To install on Mavericks:

  1. download the script
  2. Open New File.workflow
  3. I was prompted to either install or open -- choose to install.

That's it.

You will only see the 'New File' option when you right click the parent folder or another file. Sometimes it is under 'Services' menu item.

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.

Provided that you have a terminal open:

  1. Type cd (with a trailing space)
  2. Do you see the blue folder icon in the Finder title bar? It is draggable - so drag that folder icon into the terminal window after the cd and press enter to switch to that folder.
  3. Type echo some very important note > mynewfile.txt

The echo command achieves two tasks: creating a file and adding text to it.

To add some more text to an existing file use echo more text >> mynewfile.txt.

Warning: if you do echo some text > existingfile.txt on an existing file the original contents will be lost! Therefore it is safest to always use >> (append) instead of >, because >> will create the file if it does not exist.

To paste multiline text from the clipboard to a new file:

  1. In Terminal type cat > newfile.txt.
  2. Paste the text.
  3. Press Control+d.

Note: the icon in the title bar of most apps, including text editors, and apps like Pages, TextEdit, Preview, etc is draggable which means it can be dragged into the Terminal, into any app with editable content, into form fields on web pages, into chat windows of your favorite messenger or address bars in web browsers. Also if you select the URL in the browser address bar (e.g. +L) you can then drag and drop it into any editable field. And if you drag the icon right to the left of the address bar into a rich text field (i.e. Pages or Notes) you will get a nice link with the page title.

There is an affordable App store app "New File Here": https://itunes.apple.com/ch/app/new-file-here/id777221999?mt=12

It works nicely, and also has built in templates, which could come in handy.

What I'm missing: You have to point on a folder (not in the empty space in the finder), keyboard shortcut.

This really annoyed me and I could not find a viable solution anywhere.

Nothing worked for me so I created my own solution.

What I wanted it to do.

1: Command + n to create a new file ( with any extension eg. file.php .htaccess info.json etc... )

2: The active finder window should be the location for the file to be created. ( Even Desktop. Most solutions fail to create files on desktop. )

3: The input text prompt should be active after pressing the hotkey. (The normal method to prompt with workflows does not focus to the input text causing you to have to go to your mouse to click on the input field and focus on the text every time you create a new file.)

( How it works: The workflow finds the active finder instance and runs a shell task to simply touch the filename relative to the current path. Thus files that already exist will not be modified or overwritten. )

https://github.com/SplicePHP/workflows

(Currently only has New File in there and will add some more workflows later.)

Download and install Keyboard Maestro or something like it.

Create a group called Finder Macros and only have these items triggered if finder is active.

Now create a new hotkey for command + n and point it to the NewFile.workflows file downloaded from my repo.

That's it. Enjoy never thinking about this issue again.

I'm using an app called Easy New File Creator You can download and install it for free. (no need to buy full version) This is how its preferences look like:

Easy New File Creator Prefernces

After configuring it's preferences, customize the finder by selecting its extension at System Preferences > Extensions > Finder and select box besides Easy New File Creator Extension which looks like this

Now when you right click (or control+click) you'll get options like this.

By selecting on New File Here, you can create a new file there itself. While creating new file name the file according to your requirement. (If you want to create a python file, name it Untitled.py)

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top