Software:Leo (text editor)
Developer(s) | Edward K. Ream, et al. |
---|---|
Written in | Python |
Operating system | Cross-platform |
Size | ~9 MB |
Type | Text editor, Outliner, IDE |
License | MIT |
Website | 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.
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).[1] Syntax highlighting is provided for many different programming languages.[2] 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.[2] 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.[3][4] 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.
References
- ↑ Pieterse, Vreda; Kourie, Derrick G.; Boake, Andrew (2004). "A Case for Contemporary Literate Programming". 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. https://web.archive.org/web/20160304000537/http://espresso.cs.up.ac.za/publications/vpieterse_etal_saicsit.pdf. Retrieved 2014-11-18. 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. https://archive.org/details/springer_10.1007-b98150. Table 2: "Some Language Independent LPEs", p. 251
- ↑ 2.0 2.1 Vestdam, Thomas; Nørmark, Kurt (September 2004). "Maintaining Program Understanding - Issues, Tools, and Future Directions". Nordic Journal of Computing (Finland) 11 (3): 303–320. ISSN 1236-6064. Archived from the original on 29 November 2014. https://web.archive.org/web/20141129045212/http://people.cs.aau.dk/~normark/elucidative-programming/papers/issues_tools_future.pdf. Retrieved 18 November 2014. Leo discussed on pp. 12-13 of author's copy of published article.
- ↑ 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. "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)
- ↑ Swaine, Michael (July 1998). "Programming Paradigms". Dr. Dobb's Journal. Archived from the original on 2016-04-15. https://web.archive.org/web/20160415194559/http://www.drdobbs.com/programming-paradigms/184410614.Compares early version of LEO with Donald Knuth's WEB.
External links
- on GitHub
- "LeoVue, A web-based version of Leo, by Joe Orr". https://kaleguy.github.io/leovue.
- "LeoInteg, A VSCode extension that integrates Leo, by Félix Malboeuf". https://github.com/boltex/leointeg.
- "LeoJS". https://github.com/boltex/leojs.
- "Literate Programming and Leo". Slashdot. 2002-08-28. http://developers.slashdot.org/article.pl?sid=02/08/28/1655207.
- James Tauber (2004-05-15). "Using the Leo Outliner as a PIM". http://jtauber.com/blog/2004/05/15/using_the_leo_outliner_as_a_pim/.
Original source: https://en.wikipedia.org/wiki/Leo (text editor).
Read more |