15

When I'm writing or reading code (Java, JavaScript, HTML, CSS, XML, etc.), I prefer something more lightweight than an IDE, that highlights syntax but doesn't do much else. What options are there for OSX?

On Windows, I'd probably use notepad++, and on Linux, most distros have a default syntax highlighting text editor of some sort.

Important features

  • syntax highlighting

  • the ability to turn auto-completion off if present (I find it intrusive)

  • short load times, and few extraneous features.

  • low cost (less than £20) or free

Bonus

  • opening multiple files at once, in tabs, or side by side views
6

Take a look at Atom. "A hackable text editor for the 21st Century"

It is very similar to TextMate or SublimeText, written by the folks at GitHub, and it's open-source. Its core value proposition is being customizable, but having a very solid starting configuration.

Their goal:

"At GitHub, we're building the text editor we've always wanted. A tool you can customize to do anything, but also use productively on the first day without ever touching a config file. Atom is modern, approachable, and hackable to the core. We can't wait to see what you build with it."

image of atom's interface

Features

  • Syntax highlighting: Yes.

  • The ability to turn auto completion off Yes. It's a pre-configured feature, but you can disable it.

  • Short load times, and few extraneous features. Yes Fast start up times. And you can remove all the features you'd like by removing packages, or disabling them. It has a very sensible starting set of features.

  • Low cost. Yes Its free (and open source). It also has many free, open-source packages you can extend the basic functionality with.

Bonus

  • opening multiple files at once, in tabs, or side by side views Yes. You can open new panes vertically as well as the normal horizontal tabbing. That's kind of useful! Especially for folks used to split screen file compares on a mainframe terminal.

window panes in Atom

Double Bonus - It is cross-platform. This is particularly notable because of the predicament you find yourself in. If you get to know a text editor that you can use on any platform, you won't be going through this process again!

Prebuilt versions of Atom are available for OS X 10.8 or later, Windows 7 & 8, RedHat Linux, and Ubuntu Linux.

  • I'd recommend against Atom due to performance alone. It's sometimes taking about 5 seconds to move the cursor to another line, even after disabling all plugins. (on my mac with 16GB RAM and an i5). I came here to find a replacement for it. – user1516661 Oct 25 '17 at 23:09
15

I love Sublime Text for this:

Sublime Text UI with an example document

Objective-C isn't its best language for syntax highlighting, but that was what I had open at the moment. It supports a whole list of languages:

Sublime Text list of syntax highlighting

  • It's not free, it's $70. You can use it as long as you want before buying, though.
  • It has quite a nice syntax highlighting
  • Adding this line to the preferences file disables autocomplete: "auto_complete": false
  • It's quite simple and quite powerful at the same time. The features don't force themselves upon you, but they're always there ready to use.
  • Yep. Multiple tabs at once and, however, many windows you want. There's even Chrome-like tab dragging to create new windows or move tabs.
  • It is quite a bit more expensive ($70 = ~50 EUR) than you would like, but you can try it for as long as you want and all the features are there.
  • It loads extremely fast, even on my old 2009 machine.

All in all, I love Sublime as a text editor. It can open just about anything (.CSV, .SQL, .plist, etc.) It's truly one of my most valuable utilities.

  • 2
    Yes, I also use it. It is extremely fast, even on my Eee PC 701 with a 900MHz processor... – wb9688 Feb 11 '16 at 15:09
8

TextWrangler (BBEdit's free little brother) is a general purpose text, code editor that supports syntax-coloring and has all kinds of text manipulation tools. It supports saving/editing files via sftp/ftp (using the native keychain, so if you have your ssh keys already integrated with keychain, you have nothing new to setup!)

The full feature list is fairly extensive so just check that out or just download it for free right now.

It's a native Mac application (available both as a standalone application or from the Mac App Store) so it supports versions, authenticated saves, integration with the built-in dictionary and keychain, services, native Quartz text smoothing, etc.

TextWrangler Main Screen

7

Emacs would suit your needs. OSX comes with an ancient version, you'll probably want to install a more recent version with a native interface. It's free (it's one of the historical highlights of the free software movement). As a bonus, it's available on just about any PC-style or high-end mobile platform.

The set of features that Emacs provides when editing code depends on the programming language, but in general these three features are active by default:

  • Syntax highlighting.
  • Pressing Tab indents the current line.
  • Sometimes pressing punctuation characters automatically adjusts spacing, intendation, or inserts a newline. This is called “electric” behavior. To turn off electric behavior in languages where it defaults on, open the Customize interface, go to Programming > Languages, and check the settings for “electric” or other “automatic” behavior.

Completion only happens upon explicit request (such as pressing Option+Tab) or after installing some extra plugins.

Emacs has a ton of features, but they don't get in the way. You can turn off the toolbar and the menu bar to save screen space if you like. You can even disable commands if you find that you invoke them by mistake, or just change the key bindings.

By modern standards, Emacs is pretty fast to load. If you nonetheless find it too slow to start, you can launch it at login time, and then arrange to open files either in the one existing Emacs window or in new windows (call emacsclient rather than emacs to open a file in an existing Emacs instance).

Emacs doesn't tie a file to a particular window. Inside each window, you can switch between any of the files that are open in the same Emacs instance. For a side by side view, you can either open two OS windows, or have a single OS window containing two Emacs windows (note on terminology: Emacs calls an OS window a “frame”; frames can be divided into panes which Emacs calls “window”).

  • If you like Emacs and use a Mac, you could try Aquamacs – jasonology May 19 '16 at 5:32
6

I recently started using Komodo Edit, the free lighter version of Komodo IDE. It is cross-platform, supporting Windows, Linux and OSX.

Komodo Edit supports:

  • Syntax highlighting.

  • You can turn auto-completion off easily (it doesn't have much of this to begin with).

  • Short load times.

  • Low cost (free).

  • Tabs

I don't know what qualifies as few extraneous features, so you will have to judge that yourself.

Komodo Edit editing a shell script

To disable the auto complete open Edit -> Preferences.

Komodo Edit's preferences

  • I suppose the 'few extraneous features' condition would be broken by, say, Netbeans... You are right though, it's hard to define. Not sure how to fix it really. – yochannah Feb 7 '14 at 23:02
  • @yochannah Well since you asked for an editor not an IDE I suppose you aren't going to get an answer with "extraneous features"... Except maybe emacs. – Seth Feb 7 '14 at 23:02
6

I recommend MacVim. It has all the features you need and is yet quite slim. It has some getting-used-to, but same goes for most editors :)

image of MacVim vs. VIM

Features

  • syntax highlighting: Yes. In so many languages... Also, it usually auto-detects which is one is appropriate so you don't have to care.
  • the ability to turn auto completion off if present Yes. It's not there usually and you would need to enable it.
  • short load times, and few extraneous features. Yes. Load time below 1sec (on my machine) and the features that it has donen't stick in your face if you don't want them.
  • low cost (less than £20) or free. Yes It's gratis (and open source).

Bonus

  • opening multiple files at once, in tabs, or side by side views Yes see screenshot.

Downsides

  • VIM is a mode oriented editor which needs some getting used to but knowing that you have to press i once to switch into editing mode and ESC to get back usually does it.
1

Syntax Highlighting

OSX Terminal Vim has built-in support for multiple syntax highlighting. For example, HTML syntax is available but not enabled by default on OSX.

To enable syntax highlighting create a file in your home directory with the name .vimrc:

vi ~/.vimrc

And enter the following line

 :syntax on

This will enable syntax highlighting for a number of languages that ship with Vim. For more info please see:

http://vimdoc.sourceforge.net/htmldoc/syntax.html

Autocompletion

As far as I know, Vim does not support autocompletion

Load time

Vim starts nearly instantaneously.

Features

There are number of useful hidden features if you go looking for them that are not visible on the screen.

Cost

Vim is free, open source, and installed on OSX by default.

Multiple Files

Please see the following link:

https://stackoverflow.com/questions/53664/how-to-effectively-work-with-multiple-files-in-vim

1

Visual Studio Code is another great option for a text editor. It's Microsoft's lightweight alternative to their Full featured IDE "Visual Studio".

I've been using this lately, and it's been great. There are tons of add-on packages, and you can keep it as bare-bones, or full featured as needed.

It's FREE, actively maintained, and sees much twitter love.

Visual Studio Welcome Screen

It has great community support, like this Pluralsight course, a great "tips and tricks" readme.md on github from Microsoft, a cool Scotch.io course, etc.

Features

  • Syntax highlighting: Yes.

  • The ability to turn auto completion off Yes. It's a pre-configured feature, but you can disable it in the preferences.

  • Short load times, and few extraneous features. Yes The base install has no packages, so you get to pick your favorites, or none at all.

  • Low cost. Yes Its free (and open source). It also has many free, open-source packages you can extend the basic functionality with.

Bonus

Double Bonus

  • it's cross-platform, like Sublime-Text, Atom, and others.
  • Integrated terminal
  • Integrated git, and diff support
1

Brackets is a popular editor. It has syntax highlighting for many languages. There are plug-ins available to add features to this editor. It has been in use for several years now so there are many references to it on the internet. I've used it for HTML and Python programming. It worked great for both. Rated number one editor by one publication. Brackets is free.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.