Mac OS X Command Line 101 by Richard Burton. Advanced Command Line Editing In Mac OS X - September 6th, 2002. More Command Line Text Editing - August 16th, 2002.
Active23 days ago
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.
Vito Gentile
8,33066 gold badges4545 silver badges7878 bronze badges
CeetangCeetang
7 Answers
There are plenty of ways. Try:
5,01277 gold badges3737 silver badges104104 bronze badges
pyCthonpyCthon
4,9231212 gold badges5757 silver badges107107 bronze badges
The option Vito GentileVito Gentile
-e is used to open the file <filename> with TextEdit.
8,33066 gold badges4545 silver badges7878 bronze badges
Simply use
open <filename> command as described in this article. It will open an app associated with the file type.
Use ejboyejboy
open -e to open /Applications/TextEdit
3,44044 gold badges2222 silver badges2929 bronze badges
About some of the previous suggestions here - you can use
open command combined with a flag to open a file with specific application:
open -a [appname] [filename]
but if
[filename] doesn't exist it displays an error the file doesn't exists or something like that, and doesn't create the required file, as you have requested.
Write the following to your
~/.bashrc file (if that file doesn't exists, you can create it by writing touch ~/.bashrc inside the terminal):
And use it like this:
open2 [appname] [filename]
Note that
appname is an application in your installed application folder (/Applications ).
Sublime text 3 for python mac. The command Roy MilohRoy Miloh
touch creates you the required file (don't worry, if the file exists it won't remove / reset the current file, only redefine the modification time to the current time).
2,99611 gold badge1212 silver badges1616 bronze badges
If your using text mate you can set it up to work with terminal
Taken from
Once you've got mate into your path you can type the following into the terminal
if you want text mate to display all files in a folder as a project drawer
user1873471
The problem with:
or
is that you have no control on the TextEdit.app modes: Plain Text or RichText.
E.g. if you try to open an HTML file, TextEdit will open it in the Rich Text mode, not in the Plain Text mode, as expected. Then switching to the Plain Text mode will not show the HTML tags.
I could not find a Terminal command to activate the Open option:
or the Preference setting:
As far as I can see, even an osascript won't solve the case.
This is unfortunate since TextEdit.app is the only text editor that is present for sure. Not all Mac users have installed BBedit, TextMate, or any other third party editor and even less users have defined a 'default editor'.
General Failure
1,61022 gold badges1313 silver badges3636 bronze badges
linuslinus
Go to Preferences (⌘+,) & install shell support.
Then you could open any files from terminal with:
or
SeargeSearge
Not the answer you're looking for? Browse other questions tagged macoscompilationterminal or ask your own question.
We all use text editors to take notes, save web addresses, write code, as well as other uses. Every operating system comes with a default, basic text editor, but most of us install our own enhanced text editors to get more features.
In this article, we’ve gathered links to many different text editors used for different purposes. You can use text editors for basic text editing and taking notes, writing programming code, producing LaTeX documents, writing a book, among many other uses.
How To Open Command Prompt On MacNotepad and WordPad Replacements
Are you looking for more capabilities than the default Notepad in Windows? Would you rather use a graphical text editor in Linux, rather than the built-in vi? There are many options for useful text editors out there. Best html text editor for mac.
Some employ a tabbed interface, such as Jarte (which is based on the WordPad word processing engine and integrates easily with WordWeb), EditPad Lite (which also has the automatic backup), and Notetab Light (which can also calculate the value of mathematical expressions entered in the program). Jarte, EditPad Lite, and Notetab Light are all only available for Windows. Jarte is also available as a portable program.
Typically, Vi is the default text editor in Linux operating systems and it’s a keyboard intensive program with no graphical user interface (GUI). A good text editor for Windows that has hotkeys available for its 312 text-processing functions, innovative features, and timesaving tools is TED Notepad, which is also available as a portable program. Emacs is also available for both Windows and Linux, and is customizable. It also includes a file compare utility and a file manager. You can also add Org-mode to Emacs, which is a personal information management and outlining tool. If you prefer text editors with GUIs, Vim and gEdit are both good options and are available. Vim is essentially the graphical version of Vi. For help editing text files in Vi or Vim, see our Beginner’s Guide.
GetDiz is a Notepad replacement for Windows that allows you to edit many text files quickly from within Windows Explorer and has enhanced functionality for dealing with DIZ and NFO files. It can also display ASCII art correctly. Another ASCII text formatter for Windows is TextMorph, which can also convert text to and from HTML and clean up emails (remove all the “>” symbols, etc.), and search and replace by words or multiple paragraphs.
Programmer’s Text Editors
There are many text editors that provide useful functionality for programmers. Most support syntax highlighting for many programming languages, multiple document editing, and are extendable with plugins. Some also allow editing of remote files through FTP.
PSPad not only supports syntax highlighting, but also matching bracket highlighting for most popular programming languages. It also has a hex editor, macro recorder, and a differencing tool. PSPad also easily integrates with the free version of the TopStyle CSS editor. Notepad++ also supports bracket highlighting and macro recording. It also supports syntax folding and is highly customizable through plugins using the included plugin manager. Both PSPad and Notepad++ are only available for Windows.
The cross-platform (Windows, Linux, and Mac OS X) editor, jEdit, supports syntax highlighting for over 200 programming languages and auto indent, as well as a differencing utility, an FTP browser, and block selecting. It is also extendable using plugins and macros, and there are hundreds of plugins and macros available through the built-in plugin manager feature.
Programmer’s Notepad for Windows supports syntax highlighting using schemes, both built-in and user-defined, code folding and outlining, a tabbed interface with multi-level split views, and the ability to export to HTML (using CSS) and RTF.
If you like the Vi editor in Linux, but prefer a graphical editor that also serves well as a programmer’s text editor, Editra and Komodo Edit are good options. They both provide Vi emulation, as well as support for syntax highlighting in many programming languages and code folding. Editra has a tabbed interface, allows block (un)commenting and (un)indenting, and is extendable using the built-in plugin downloader/installer. Komodo Edit supports background syntax checking and contains a toolbox with shell command integration, macros, and code snippets. Both Editra and Komodo Edit are available for Windows, Linux, and Mac OS X.
Other options include the following:
Microsoft Word Replacements
There are also free programs that act as replacements for Microsoft Word. They can be used as text editors, but they have more formatting features than simple text editors. You can add images and tables, change fonts and color, and insert hyperlinks.
AbiWord runs on Windows and Linux and can read and write OpenOffice.org documents, Microsoft Word documents, WordPerfect documents, Rich Text Format documents, and HTML web pages. It has advanced document layout options such as tables, bullets, numbered lists, images, styles, footnotes, and endnotes. It even has a Mail Merge utility like Microsoft Word. You can extend AbiWord with a variety of plugins, which can be selected when you install AbiWord. A portable version is also available that you can run from a USB flash drive.
Angel Writer is a small rich text editor for Windows with a high performance rate that allows you to easily create impressive documents. https://everadult269.weebly.com/blog/how-to-highlight-text-in-powerpoint-for-mac.
Minimalist Text Editors
If you get distracted when you write by the plethora of features in text editors and word processors, you might want to try one of the so-called “minimalist” text editors out there. They are “no-frills” editors that either don’t offer any formatting features or many of the other features of modern word processors, and even third-party text editors, or the features are hidden until you want them. Without all the fancy features staring you in the face, you can concentrate on the task of writing. Below is a list of some of the minimalist text editors we found.
Open Command Prompt Mac
You can even download Word 5.5 from Microsoft for free and run it under DOSBox in Windows.
If you want a simple text editor with the ability to count down from a set word count, try yEdit2 for Windows. If you have to write a certain number of words, yEdit2 can make it easier.
Secure Text Editors
You can also use a text editor as secure place to store private information. There are several text editors that either include encryption as a feature or are specially designed for securely storing text. Notepad++, mentioned in the Programmer’s Text Editors section above, allows you to add encryption functionality using the SecurePad plugin, which is available through the Plugin Manager. SecurePad will encrypt selected text in the current document or the whole document.
Steganos LockNote is a small, simple method for securely storing chunks of information in files. For example, if you purchase a download-only program, you can use LockNote to store the product key or serial number that goes with that program in the same folder, so you always know where to find it.
Command Prompt And Text Editor For Mac OsLaTeX Editors
Do you write a lot of scientific papers, documents, or books? If so, there are several text editors that allow you to easily use TeX/LaTeX (document markup language and document preparation system) through a graphical interface to create mathematical content and structured documents like academic articles, theses, and books.
Novel Writing Editor
There’s even an editor that’s meant for writing novels, called yWriter5, available for Windows and Linux. It breaks your novel into chapters and scenes, helping you to keep track of your work. However, yWriter5 does not suggest plot ideas, character names, or write any part of your novel for you. The creative task of writing is still up to you, yWriter5 just makes it easier.
One more text editor to mention is Nano in Linux, which is an easy-to-use text editor you run directly on the command line. Nano is installed by default in Ubuntu and many other Linux distros, and is easier to learn than Vi or emacs.
READ NEXT
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |