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?

Viet
  • 223

2 Answers2

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
nohillside
  • 100,768
pen-helm
  • 121
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'
}
nohillside
  • 100,768