4

Normally when I click on TextEdit or use Spotlight to open it, I'll have to click on "New Document". However, I notice some Mac start TextEdit with a new document right away. How did people do that?

I know this answer but that requires either removing the functionality to sync text file with iCloud or using a terminal command. Is there an easier way?

1
  • 2
    It's not "right away" but in this situation for me ⌘ + N is simple enough. Commented Apr 2, 2022 at 8:50

2 Answers 2

4

You can use AppleScript to launch TextEdit from Terminal with an new, empty document:

osascript -e 'tell application "TextEdit"
   activate
   make document
end tell'

If you use it often you can turn it into a shell function by putting the following into the relevant startup file (.bashrc or .zshrc) of your shell:

function newtext() {
   osascript -e 'tell application "TextEdit"
   activate
   make document
end tell'
}
0
6

You can have TextEdit always create an untitled document at launch (from https://git.herrbischoff.com/awesome-macos-command-line/about/#textedit):

defaults write com.apple.TextEdit NSShowAppCentricOpenPanelInsteadOfUntitledFile -bool false
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .