Tag: Editor

Kilo- a thousand lines text editor in C

Kilo- a thousand lines text editor in C

Antirez kilo text editorDeveloped by Salvatore Sanfilippo aka antirez and licensed under the BSD 2 licence, kilo is a simple text editor in one file.

If you are learning C and want to see how to write a utility, this might be a good example to follow. Warning though he does use pointers so make sure you’ve learnt them first!

I had a stab at writing one quite a few years ago but it wasn’t very good. I have a suspicion that writing a good text editor depends upon you first creating a good implementation of the text storage. Solve that and it’s downhill for the rest.

I’ve added this to my curated library of C code, on the C Code link on the top menu.

 

A command line editor in C

A command line editor in C

Thompson Davis Editor (TDE)The screenshot is of an open source command line editor for Dos, Windows and Linux called TDE which is short for Thomson Davis Editor.

As the website says “TDE is a simple, public domain, multi-file/multi-window binary and text file editor written for IBM PCs and close compatibles running DOS, Win32 (console) or Linux. TDE is suitable for editing batch files, binary files, text files, and various computer language source code files (with configurable syntax highlighting). The only limit on the number and size of files that TDE can handle is the amount of memory. Likewise, the only limit on the number of windows is the amount of memory. There is no preset maximum number of files or windows that may be open at any one time.

What interested me with this was that the editor should work for Linux. It includes a viewer mode where files are loaded read-only,  file search (text or regular), can load files as binary, run a file as a Macro and display several source files with formatting. It certainly sounds a loty better than nano which is a terminal editor.