source code editor

From Lazarus wiki

What's a source code editor?

Let's first exclude, what it is not. It is not a textprocessor, i.e.

  • uses an single monospaced western font of unique size and spacing [Courier].
  • lines have a unique height and spacing.
  • does not add hidden attributes to the stored text.
  • text attributes are used only for #syntax highlighting or similar predefined purposes.
  • has left justified tabstops [of unique width?]
  • does not normally wrap long lines.
  • has no document, page or paragraph formatting or layout.

Some common and desireable features are:

Additional useful extensions:

Also desireable, but not for source code editing:


(to be categorized)


For traditional and performance reasons, a monospaced font shall be used. This allows to manage the display in form of a grid, with easy mapping between screen coordinates and character indices. Most compilers only accept ASCII code, other characters can be used only in comments.

Of course support for other character sets (input and display) and input orientation (right-to-left) can be added - by persons with according knowledge and skills. I have no idea how to e.g. mix RTL string literals with LTR program code. OTOH I'm not comfortable with ASCII text myself, as are many more non-English speakers. I'll support any (every?) attempt to remove language barreers from SynEdit, but cannot contribute many ideas or techniques to this subject.