Leo (text editor)

Last updated
Leo: Leonine Editor with Outlines
Developer(s) Edward K. Ream, et al.
Stable release
6.7.4 [1] / 17 August 2023;2 months ago (17 August 2023)
Repository
Written in Python
Operating system Cross-platform
Size ~9 MB
Type Text editor, Outliner, IDE
License MIT
Website leo-editor.github.io/leo-editor/

Leo is an open-source text editor/outliner that features clones (virtual copies of outline nodes) as a central tool of organization, navigation, customization and scripting.

Contents

Languages

Leo can manipulate text or code in any human or computer programming language (e.g., Python, C, C++, Java), as Leo is a language-independent or "adaptable LPE" (literate programming environment). [2] Syntax highlighting is provided for many different programming languages. [3] Leo is written in Python and can be extended with plugins written in Python. The GUI uses the Qt toolkit; the syntax-aware editor is based on Scintilla. Leo outlines are stored as XML files.

Trees, clones and views

Leo's foremost functionality, in addition to text editing, is that of an outliner, with a "vast range of convenience features for structuring and managing outlines" both by drag-and-drop via GUI and by keyboard commands. [3] Leo's outline pane shows a tree of data nodes. Nodes contain headlines, body text, and other information. Headlines naturally serve as descriptions of the body text. For example, @file nodes are nodes whose headline starts with @file. Leo trees are in fact directed acyclic graphs; nodes may have more than one parent. Leo calls such nodes clones. Clones appear in several places in the outline pane. Views are simply nodes whose children contain clones. A single outline may contain arbitrarily many views of the nodes contained therein.

External files

@file nodes represent external files, files on the computer's file system other than the outline file. When saving an outline Leo automatically writes all changed @file trees back to the external files. Comments, called sentinel lines, in external files represent the outline structure. When Leo reads an outline, these comments allow Leo to recreate @file trees using only the data in the external file. @auto nodes and @clean nodes represent external files without using sentinel comments. When reading @auto nodes, Leo uses the program structure of the external file to create the @auto tree. When reading @clean nodes, Leo uses the structure of the outline to create the @clean tree.

Scripting

Leo's outline or hierarchical structure is distinct from the web of interleaved program and documentation "chunks" associated with classic literate programming tools. [4] [5] The body text of any Leo node may contain a Leo script, a Python script executed in the context of a Leo outline. A simple API gives Leo scripts full access to all data in loaded outlines, as well as full access to Leo's own source code. The API includes Python iterators that allow scripts to traverse outlines easily. Scripts may be composed of any tree of nodes. A markup language similar to noweb tells Leo how to create scripts from (parts of) an outline. Headlines control and guide scripts. For example, @button nodes create user-defined commands. Leo executes the script of an @button node in the context of any other outline node.

Related Research Articles

<span class="mw-page-title-main">Literate programming</span> A programming approach of software development

Literate programming is a programming paradigm introduced in 1984 by Donald Knuth in which a computer program is given as an explanation of how it works in a natural language, such as English, interspersed (embedded) with snippets of macros and traditional source code, from which compilable source code can be generated. The approach is used in scientific computing and in data science routinely for reproducible research and open access purposes. Literate programming tools are used by millions of programmers today.

<span class="mw-page-title-main">Vim (text editor)</span> Improved version of the Vi keyboard-oriented text editor

Vim is a free and open-source, screen-based text editor program. It is an improved clone of Bill Joy's vi. Vim's author, Bram Moolenaar, derived Vim from a port of the Stevie editor for Amiga and released a version to the public in 1991. Vim is designed for use both from a command-line interface and as a standalone application in a graphical user interface.

gedit Linux text editor

gedit is a text editor designed for the GNOME desktop environment. It was GNOME's default text editor and part of the GNOME Core Applications until GNOME version 42 in March 2022, which changed the default text editor to GNOME Text Editor. Designed as a general-purpose text editor, gedit emphasizes simplicity and ease of use, with a clean and simple GUI, according to the philosophy of the GNOME project. It includes tools for editing source code and structured text such as markup languages.

<span class="mw-page-title-main">Outliner</span> Type of software to organize texts

An outliner is a specialized type of text editor used to create and edit outlines, which are text files which have a tree structure, for organization. Textual information is contained in discrete sections called "nodes", which are arranged according to their topic–subtopic (parent–child) relationships, like the members of a family tree. When loaded into an outliner, an outline may be collapsed or expanded to display as few or as many levels as desired.

Irrlicht is an open-source game engine written in C++. It is cross-platform, officially running on Windows, macOS, Linux and Windows CE and due to its open nature ports to other systems are available, including FreeBSD, Xbox, PlayStation Portable, Symbian, iPhone, AmigaOS 4, Sailfish OS via a QT/Qml wrapper, and Google Native Client.

<span class="mw-page-title-main">Inkscape</span> Vector graphics editor

Inkscape is a free and open-source vector graphics editor for GNU/Linux, Windows and macOS. It offers a rich set of features and is widely used for both artistic and technical illustrations such as cartoons, clip art, logos, typography, diagramming and flowcharting. It uses vector graphics to allow for sharp printouts and renderings at unlimited resolution and is not bound to a fixed number of pixels like raster graphics. Inkscape uses the standardized Scalable Vector Graphics (SVG) file format as its main format, which is supported by many other applications including web browsers. It can import and export various other file formats, including SVG, AI, EPS, PDF, PS and PNG.

<span class="mw-page-title-main">Graphviz</span> Software package for graph visualization

Graphviz is a package of open-source tools initiated by AT&T Labs Research for drawing graphs specified in DOT language scripts having the file name extension "gv". It also provides libraries for software applications to use the tools. Graphviz is free software licensed under the Eclipse Public License.

DOT is a graph description language, developed as a part of the Graphviz project. DOT graphs are typically stored as files with the .gv or .dot filename extension — .gv is preferred, to avoid confusion with the .dot extension used by versions of Microsoft Word before 2007. dot is also the name of the main program to process DOT files in the Graphviz package.

<span class="mw-page-title-main">Far Manager</span> File and archive manager for Microsoft Windows

Far Manager is an orthodox file manager for Microsoft Windows and is a clone of Norton Commander. Far Manager uses the Win32 console and has a keyboard-oriented user interface.

This article provides basic comparisons for notable text editors. More feature details for text editors are available from the Category of text editor features and from the individual products' articles. This article may not be up-to-date or necessarily all-inclusive.

<span class="mw-page-title-main">FontForge</span> Font editor created by George Williams

FontForge is a FOSS font editor which supports many common font formats. Developed primarily by George Williams until 2012, FontForge is free software and is distributed under a mix of the GNU General Public License Version 3 and the 3-clause BSD license. It is available for operating systems including Linux, Windows, and macOS, and is localized into 12 languages.

<span class="mw-page-title-main">Geany</span> Integrated Development Environment

Geany is a free and open-source lightweight GUI text editor using Scintilla and GTK, including basic IDE features. It is designed to have short load times, with limited dependency on separate packages or external libraries on Linux. It has been ported to a wide range of operating systems, such as BSD, Linux, macOS, Solaris and Windows. The Windows port lacks an embedded terminal window; also missing from the Windows version are the external development tools present under Unix, unless installed separately by the user. Among the supported programming languages and markup languages are C, C++, C#, Java, JavaScript, PHP, HTML, LaTeX, CSS, Python, Perl, Ruby, Pascal, Haskell, Erlang, Vala and many others.

Protocol Buffers (Protobuf) is a free and open-source cross-platform data format used to serialize structured data. It is useful in developing programs that communicate with each other over a network or for storing data. The method involves an interface description language that describes the structure of some data and a program that generates source code from that description for generating or parsing a stream of bytes that represents the structured data.

<span class="mw-page-title-main">Org-mode</span> Open source mode for GNU Emacs

Org Mode is a mode for document editing, formatting, and organizing within the free software text editor GNU Emacs and its derivatives, designed for notes, planning, and authoring. The name is used to encompass plain text files that include simple marks to indicate levels of a hierarchy, and an editor with functions that can read the markup and manipulate hierarchy elements.

<span class="mw-page-title-main">Sublime Text</span> Text editor

Sublime Text is a shareware text and source code editor available for Windows, macOS, and Linux. It natively supports many programming languages and markup languages. Users can customize it with themes and expand its functionality with plugins, typically community-built and maintained under free-software licenses. To facilitate plugins, Sublime Text features a Python API. The editor utilizes minimal interface and contains features for programmers including configurable syntax highlighting, code folding, search-and-replace supporting regular-expressions, terminal output window, and more. It is proprietary software, but a free evaluation version is available.

<span class="mw-page-title-main">Spyder (software)</span> IDE for scientific programming in Python

Spyder is an open-source cross-platform integrated development environment (IDE) for scientific programming in the Python language. Spyder integrates with a number of prominent packages in the scientific Python stack, including NumPy, SciPy, Matplotlib, pandas, IPython, SymPy and Cython, as well as other open-source software. It is released under the MIT license.

<span class="mw-page-title-main">Atom (text editor)</span> Free and open-source text and source code editor

Atom was a free and open-source text and source code editor for macOS, Linux, and Windows with support for plug-ins written in JavaScript, and embedded Git Control. Developed by GitHub, Atom was released on June 25, 2015.

<span class="mw-page-title-main">Pluma (text editor)</span>

Pluma is a fork of gedit 2 and the default text editor of the MATE desktop environment used in Linux distributions. It extends the basic functionality with other features and plugins.

<span class="mw-page-title-main">CudaText</span> Open source text editor

CudaText, from Bosnian-Croatian-Montenegrin-Serbian čuda, is a free open source cross-platform native GUI text and source code editor. CudaText supersedes its predecessor SynWrite, no longer under development.

References

  1. "Release 6.7.4". 17 August 2023. Retrieved 18 September 2023.
  2. Pieterse, Vreda; Kourie, Derrick G.; Boake, Andrew (2004). "A Case for Contemporary Literate Programming" (PDF). SAICSIT '04: Proceedings. Republic of South Africa: South African Institute for Computer Scientists and Information Technologists: 111–118. Archived from the original on 2016-03-04. Retrieved 2014-11-18.{{cite journal}}: CS1 maint: bot: original URL status unknown (link) Table 2: "Some Adaptable LPEs", p. 113. Same authors' abridged version in book form: Eckstein, Jutta; Baumeister, Hubert, eds. (June 2004). "Literate Programming to Enhance Agile Methods". Extreme Programming and Agile Processes in Software Engineering. Berlin; Heidelberg; New York: Springer-Verlag. pp. 250–253. ISBN   3-540-22137-9. Table 2: "Some Language Independent LPEs", p. 251
  3. 1 2 Vestdam, Thomas; Nørmark, Kurt (September 2004). "Maintaining Program Understanding - Issues, Tools, and Future Directions" (PDF). Nordic Journal of Computing. Finland. 11 (3): 303–320. ISSN   1236-6064. Archived from the original on 29 November 2014. Retrieved 18 November 2014.{{cite journal}}: CS1 maint: bot: original URL status unknown (link) Leo discussed on pp. 12-13 of author's copy of published article.
  4. Palmer, James Dean; Hillenbrand, Eddie (2009). "Reimagining Literate Programming". OOPSLA '09: Proceedings of the 24th ACM SIGPLAN Conference Companion on Object Oriented Programming Systems Languages and Applications. New York: ACM. pp. 1007–1014. doi:10.1145/1639950.1640072. ISBN   9781605587684. S2CID   17591332. A few literate programming systems have taken a much different tack based on novel user interfaces. Edward Ream's literate editor, Leo, uses visual outlines that allow users to attach metadata and descriptions to program descriptions and data. Unfortunately, truly literate programs may break Leo's hierarchical outline based paradigm. (p. 1009)
  5. Swaine, Michael (July 1998). "Programming Paradigms". Dr. Dobb's Journal. Archived from the original on 2016-04-15.Compares early version of LEO with Donald Knuth's WEB.