In the Windows command prompt, I can type notepad helloworld.cpp
which will then create a .cpp file with the name helloworld and open up Notepad for me.
Is there a similar function for Mac Terminal, preferably with Textmate or Textedit?
I'm running Mac OS X Lion 10.7, with Xcode developers tool.
In the Terminal app on your Mac, invoke a command-line editor by typing the name of the editor, followed by a space and then the name of the file you want to open. If you want to create a new file, type the editor name, followed by a space and the pathname of the file.
If you already started to write in terminal and you want to continue on your favorite editor you can press ctrl + X , ctrl + E and continue working in emacs or your default bash editor. Show activity on this post. From man open : -e Opens with TextEdit.
open -e <filename>
The option -e
is used to open the file <filename>
with TextEdit.
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