Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I invoke a text editor from the terminal?

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.

like image 703
Ceetang Avatar asked Feb 23 '12 21:02

Ceetang


People also ask

How do I open TextEdit in terminal Mac?

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.

How do I open a text editor in Linux terminal?

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.


1 Answers

open -e <filename> 

The option -e is used to open the file <filename> with TextEdit.

like image 82
Vito Gentile Avatar answered Oct 11 '22 21:10

Vito Gentile