How I’m Using Textedit beyond VI and VIM to edit files from the Mac os terminal

There’s a joke about the Unix editor vi, that goes something like: I’ve been using vi for so long, because I can’t figure out how to get out of it. Vim, in my opinion isn’t any better. I can appreciate the power these editors have, and they’re really fast for those who are comfortable on them, but I think of documents more fluidly than only 1 line at a time. I can use nano if I have to, but I feel most comfortable in an interface at least as developed as something like notepad or Textedit. Enter another way to cheat in the Mac OS terminal.

Before actually doing this, it’s a good idea to change a few settings in Textedit or bad things might happen.

Bring up the preference in Textedit either through the menus or just press Command-comma.
In the new document tab, select the plain text radio button, also make sure that the check spelling as you type, the check grammar with spelling and the correct spelling automatically check boxes are unchecked. You also want the smart quotes and smart dashes options to be unchecked.

On the open and save tab: you may want the display html text as code instead of formatted text checked. You definitely want the add .txt extension to plain text files unchecked, or things will stop working.

Now that we have that all out of the way…

 

alias ted=’open -e $1′

Something so easy you can have it working immediately in a brand new squeaky clean install before you even have your most favorite apps up and running. There are awesome editors out there that can also work with files from the command-line that do way more than Textedit could ever dream of, like TextMate and BBEdit, but this is still a nice fix to keep in the toolbox that requires nothing beyond what OS X provides out of the gate.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s