A good Text editor must do two things very well: syntax highlighting (coloration of the code) and auto completion. Lets highlight 5 Best text editors and take a bird’s eye view of how each one of them can assist us while developing websites. If your diff is of source code, you might also occasionally want to toggle back and forth between syntax highlighting of the diff and syntax highlighting of the code; you can also set the syntax to java, c, php, mysql, or sh, among others. Looking for a Mac text editor? UltraEdit is the perfect text, hex, and programmers editor with millions of users worldwide. Download a free trial! UltraEdit text editor for Mac. The world's favorite text and source code editor, on Mac. Code syntax highlighting for nearly any programming language.
I'm a pc guy, but I have a programming student who's got a mac. We have been using TextMate, but there are a few features missing that I either can't find, or that are not available in TextMate.
In my beloved Notepad++ I have the following features:
- vertical gridlines, that help you see how far indented you are
- when putting your cursor next to a pair of brackets or inside an html tag, the matching bracket or tag will be highlighted, in the case of curly braces the aforementioned gridlines will even be highlighted (so if you have consistently indented code, you'll just have to scan down the highlighted, dotted line, and you'll find the matching bracket)
- when highlighting a word (which is quick by double clicking on it) all other instances of that same word will be highlighted (where else did i use that function/variable? did i name it consistently?)
- Commenting multiple lines of text by highlighting and hitting [strg]+[k]
- Un-Commenting multiple lines of text by highlighting and hitting [strg]+[shift]+[k]
- Indenting multiple lines of text by highlighting and hitting [strg]+[tab]
- Un-Indenting multiple lines of text by highlighting and hitting [strg]+[shift]+[tab]
- the ability to chose how to interpret the file (what language) textmate's interpretation is quite buggy... somethimes you'll open a file and it'll be all white even though it's clearly a .css file or so.
- function completion, such as parameter hints, closing html tags automatically, and completing brackets, would also be helpful. I love hot notepad++ shows you when you type a variable what variable names you have already used in the document.
Textmate's handling of brackets and quotations rocks: it adds the matching pair for you, but wont advance the cursor, so if it's in your muscle memory to do them at the same time, it won't waste your time. and you can highlight a word and hit quotes or brackets, and it'll wrap the word in brackets. So those would be a bonus, but it's nothing I miss when using Notepad++, however the combination of lacking the above is frustrating.
Does anybody know a free program for Mac with these features?
And while you are at it, could you please point out how to activate and use these features?For example I know TextMate has a way to indent, but the key combination it gives you makes no sense to me...
Thanks for any suggestions!
4 Answers
Sublime Text
There are some things worth paying for in life and a solid text editor is, in my opinion, one of them. If it's the tool you use every day, what's a few dollars to ensure that tool is high quality? For me, that editor worth paying for is Sublime Text. I'm still on 2, but 3 is a pretty stable beta and can be had for free for the time being. Both 2 and, when it leaves beta, 3 can be 'evaluated' indefinitely if the price and paying for quality software really turns you off.
The upside to Sublime is it has a long and illustrious with a great community behind it. It has an awesome package management system in Package Control that lets you add a ton of features very quickly and easily.
To address your specific feature requests...
vertical gridlines, that help you see how far indented you are
Yes. Add:
to your preferences file.
bracket matching and tag matching when you're inside a tag
The BracketHighligher extension does this and more. There's a snazzy screen shot on its Package Control page that shows off all the ways it can highlight things out of the box.
You can find my Sublime preferences file here which has most of things you desire enabled in it already.
when highlighting a word (which is quick by double clicking on it) all other instances of that same word will be highlighted
Sublime calls this Multiple Selection. Select a word and then press Ctrl+Command+G
or Cmd-D
to select all occurrences of the word in the file. Typing will replace all occurrences simultaneously. You can do a lot more than that with Sublime. See the aforementioned page for other multiple selection ninja moves you can do.
Commenting multiple lines of text by highlighting and hitting [strg]+[k]
Highlight the block and press Command-/
to toggle comments on and off for the block. You can combine this with multiple selection mentioned above to comment out non-contiguous lines.
Un-Commenting multiple lines of text by highlighting and hitting [strg]+[shift]+[k]
It's Command-/
in Sublime to toggle comments which is easier to remember than an 'add comment' and a separate 'remove comment' action if you ask me. If you don't like the short cut you can reassign key bindings freely in Sublime to map the actions to a preferred combination.
Indenting multiple lines of text by highlighting and hitting [strg]+[tab]
That works exactly how you want: select the lines, TAB
to indent, Shift-TAB
to un-indent.
Un-Indenting multiple lines of text by highlighting and hitting [strg]+[shift]+[tab]
It's just Shift-TAB
in Sublime.
the ability to chose how to interpret the file (what language)
You can override Sublime's language guess using the View > Syntax...
menu. Pick the language you want it to be instead of the one Sublime guessed. Sublime's guessing is much better than TextMate's though IMO.
function completion, such as parameter hints, closing html tags automatically, and completing brackets, would also be helpful.
Absolutely -- they're called Snippets in Sublime's parlance. It ships with a bunch of defaults for some common languages like CSS, HTML, Ruby and Python that are useful. You can add your own snippets and you can find more language support and snippets in Package Control.
Atom
Atom is the new kid on the block. Completely free and open source, it's a text editor that started out as a closed-source project at GitHub but is now being extended by folks around the world. It has grown in popularity and capabilities very quickly. It's still a bit young so it's changing rapidly and there are some rough edges, but it's showing a lot of promise and you sure can't beat the speed at which issues get addressed in the project when they do arise.
They borrowed a lot from TextMate and Sublime so it would feel familiar to people -- both of those editors were and are very popular with OS X-based developers. Smart to start on the shoulders of giants and try standing from there, right?
Here is a great comparison between Atom and Sublime Text.
To address your specific feature requests...
vertical gridlines, that help you see how far indented you are
Best Text Editor For Mac
Yes. In the Core Settings
preferences window, scroll to the bottom and check Show Indent Guide
to see guides.
bracket matching and tag matching when you're inside a tag
It has the atom/bracket-matcher plugin that ships with it by default.
when highlighting a word (which is quick by double clicking on it) all other instances of that same word will be highlighted
Yes. Highlight a word or phrase and press Cmd-D
and it will select all instances of that pattern in the file.
Commenting multiple lines of text by highlighting and hitting [strg]+[k]
Highlight the block and press Command-/
to toggle comments on and off for the block. You can combine this with multiple selection mentioned above to comment out non-contiguous lines.
Un-Commenting multiple lines of text by highlighting and hitting [strg]+[shift]+[k]
It's Command-/
in Atom to toggle comments which is easier to remember than an 'add comment' and a separate 'remove comment' action if you ask me. If you don't like the short cut you can reassign key bindings freely in Atom to map the actions to a preferred combination.
Indenting multiple lines of text by highlighting and hitting [strg]+[tab]
That works exactly how you want: select the lines, TAB
to indent, Shift-TAB
to unindent.
Un-Indenting multiple lines of text by highlighting and hitting [strg]+[shift]+[tab]
It's just Shift-TAB
in Atom.
the ability to chose how to interpret the file (what language)
Press Ctrl-Shift-l
to opent the file type selector and reassign the language or file type for a specific file.
function completion, such as parameter hints, closing html tags automatically, and completing brackets, would also be helpful.
I'm sorry. I'm not sure how you do this and I can't find any great documentation on it. Maybe someone can annotate the answer? I'd be surprised if Atom couldn't do this.
TextMate's controls are configurable, and they're dependent on separate macro 'bundles' for the currently active language, but the standards are:
- Cmd-/ for commenting and uncommenting selected blocks
- Cmd-] for indenting selected blocks and Cmd-[ for dedenting
- Esc to autocomplete a word, but it works strictly by looking for the nearest matching word in the current document; it doesn't know anything about the current language's standard library, or words in other documents.
At the bottom of the TextMate screen you should have a footer that tells you the current line and column, the current language (so if it's mistaken about the language, fix it there), how tabs are configured, and so on.
I believe a .css bundle comes pre-installed, so I'm not sure why it wouldn't auto-identify .css.
sublime text should suit most of your needs, also it has tons of plugins that you can use to customize it.
You must log in to answer this question.
Text Editor For Mac With Syntax Highlighting
Not the answer you're looking for? Browse other questions tagged software-recommendationdevelopmentsoftwaretext-editor .
Top 5 Text Editors for Mac
Text editing is a very important part of a developer’s life. This is even more significant for Mac developers, who are accustomed to a captivating environment. For them, there is a good selection of software. Here below, is a description of five top text editors for Mac. For each of them, the highlights and downsides are detailed.
1. UltraEdit
UltraEdit is a commercial software that has been in the market since 1994. However, it has a free trial period of 15 or 30 days, depending on usage. It is well received amongst developers, and in 2006 Softpedia considered it as excellent.
UltraEdit stands out because of its multiple features, which are true aids to development. These features include many editing tools, such as automation via macros and scripts, configurable syntax highlighting, code folding, file type conversions, regular expression find and replace, column edit mode, and Unicode and hex editing mode. These utilities are complemented with an interface for APIs.
In addition, UltraEdit has functionality for comparing files, file encryption and decryption, remote editing via FTP, and project management.
Overall, UltraEdit is a best text editor for Mac as its comprehensive collection of utilities are a definite aid to any developer.
2. Brackets
Brackets is an open source and free text editor, initially created by Adobe Systems, and at present maintained on GitHub. It has been available since 2014, and it is regularly updated. This text editor Mac is written in HTML, CSS and JavaScript. It is cross platform, and aimed at Web Development.
This free text editor Mac has an impressive set of functionalities. They include Quick Edit, which allows for inline editing of CSS, Color Property, and JavaScript elements; and Live Preview, which puts code edits instantly to the browser, presenting an updated webpage as the code is changed. Live Preview is based on a Node.js backend, which predicts what the code does as the developer types the code.
Other popular functions include element highlighting, where elements selected in HTML and CSS files are highlighted within the browser; and Split View, which creates splits of windows either vertically or horizontally.
Brackets supports multiple file formats, covering over 38 file types, including C++, C, VB Script, Java, JavaScript, HTML, Python, Perl, and Ruby.
In addition, this free text editor Mac includes a feature named PSD lens, which enables the extraction of pictures, logos and design styles from PSD files without the need of opening Photoshop. Brackets richness is enhanced by its extensions, which empowers users to create additional functionality.
Summarizing, Brackets presents a popular and great choice, which in addition to being free, has many very useful features for code development.
3. Komodo Edit
Komodo Edit is an open source free text editor Mac, with a very good user interface that makes it useful for writing code and other things. This app has several useful tools for editing, such as the capacity to track changes, autocomplete, multiple section, skin and icon sets, and a markdown viewer.
Coupled with them, are multi-language support, a friendly toolbox, commando, and a projects and places manager. This editor is an offprint of the well-known Komodo IDE, from where it inherits many of its good characteristics.
Overall, it is a very professional and complete tool, with an interface that stands out. In addition, it is free and open source, meaning that the code is available to anyone wanting to use it.
4. Sublime Text
Sublime Text is a commercial text editor Mac. However, it offers an evaluation version for unlimited time, making it free in practice. Currently it is in version 2, with a beta version 3.
This editor comes with a Python Application Programming Interface (API), and supports many languages. Besides, its functionality can be enhanced via plugins, typically developed by communities and available under free software licenses.
Sublime Text has a user friendly interface, with 22 different themes to choose from. Amongst its most interesting features is the distraction free mode, which consists of having only the text in the center of the screen.
Other functionalities are an advanced customization capacity, based on simple JSON files; and split editing, which can be done with two different files or with different parts of one file.
In brief, its quick navigation to files and lines, its cross-platform support, and project-based preferences, make this app being frequently rated as “best text editor for Mac”.
5. Atom
Atom is a free and open source text editor Mac, written in Node.js and embedded in GitControl. It can be used as a plain text editor Mac, or a source code editor. Through the use of plug-ins, this app supports many languages such as HTML, CSS, C/C++, Objective-C, Java, Go, C#, JavaScript, Python, PHP, Perl, XML, Mustache, Clojure, Ruby, and several more, making it a useful tool for the modern developer.
Some of its useful characteristics include multi-tabbed editing, auto-completion, multiple panes, a file system browser, good navigation options, and a package manager. In addition, a very important feature of Atom is the availability of virtually thousands of free packages, which completely increases its functionality.
Its user interface is friendly, and it comes with several themes that permit the user to select a visual environment of his liking.
In general, Atom presents a wise choice, particularly for MEAN web developers.
Interested in recovering your deleted or lost files? Download Disk Drill
Your Companion for Deleted Files Recovery