I've been coding for almost 18 years, and having migrated to Macs for the last year or so, it was inevitable to start thinking about writing a code editor from scratch - probably, just to try this thing out, or to make something that perfectly suits my needs.

And I was wondering :

What are the absolute MUST-HAVEs of a good code editor? (by order of priority, if possible) If we're talking about a not-so-conventional feature, could you give me an example of actual implementation of that particular feature? ("xxxxx" like in Notepad++ on Windows). Looking forward to see your answers...

*Well, there is sometimes a thin line between what could be considered as an "Editor" and an "IDE", but let's just not exclude more... IDE-oriented ones...

closed as not a real question by Rahul Mar 24 '12 at 13:56

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • A way to select text and have it send to a terminal! – user189035 Jun 3 '16 at 8:34

In my honest opinion, the really great code editors have your basic features plus they are designed almost exclusively for a single language. The more specific (and less generic) the editor is designed the better it will implement all of the tiny little details of Python or Java or C++...

  • FAST (read ... faster than Netbeans or Eclipse, even if that means compromising features)
  • Show line numbers all the time
  • Syntax Highlighting
  • Allow Tab Indent or spaces, allow representing tabs as any number of spaces.
  • Document outline (what functions/classes are in this file?)
  • Support multiple languages at once (php, html, javascript) in the same file.
  • Mark lines / highlight lines (allow jumping to code segments / marked functions / classes)
  • Auto-save periodically
  • Save open-files / reopen to last open files
  • Save historical versions of the edited file (optionally)
  • Show hidden/special characters (A button that shows symbols over tabs, newlines, etc)
  • Switch between *Nix, Mac, Windows file-formats.
  • Indent multiple highlighted lines
  • Writing the code highlighter as a stand-alone library that can be maintained independent of your application and is specific to that language.
  • Writing the code highlighter so it's stupid fast (sparingly use regex)
  • Automatic Indentation (when I hit the enter key and I'm indented four spaces you should optionally start the next line at the same indentation)
  • Highlighting Keywords properly (like True, False, None in Python)
  • Autocomplete (classes, functions, built-ins, etc) .. (but keep it fast ... driven by a Ternary Search Tree not some verbose XML data structure)
  • Not attempting to perform syntax error checking on every key stroke (man that is annoying, and often really slow!)
  • Scope Awareness (rarely seen, but the ability to prioritize name suggestions based on the current line's scope)
  • Built-in Support for remote file systems (ftp, sftp)
  • Well, with 17 of your must-have features already implemented and a couple of others in my to-do list (the last 2 are the only ones actually NOT to be implemented), I hope I'm in the right track... :-) Btw, I do agree with your language-oriented approach of an editor, though I'm mostly aiming at something "all-in-one" (and customiseable via plugins for language-specific stuff)... – Dr.Kameleon Mar 24 '12 at 12:00
  • You are on the right track, I commend your efforts. I actually believe that we need better code-editors myself... I asked this questions awhile ago - programmers.stackexchange.com/questions/56511/… ... THE IDEA being that only 1 person needs to write the API for highlighting/parsing a single language - SHOULDN'T we be able to agree on the functionality around a single languages introspection !?!?!?! – Ben DeMott Mar 24 '12 at 12:05

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