Using the Leo editor

Slashdot it! Delicious Share on Facebook Tweet! Digg!
texelart, 123rf.com

texelart, 123rf.com

Noting, Planning, Programming

Programmers and web designers need to manage a variety of information from one central point. The Leo editor steps up to the challenge in several clever ways.

Although its makers describe it as an "IDE, PIM and outliner," the Leo editor [1] does more than just provide a standalone development environment. Moreover, the software can work with other IDEs, such as Emacs and Vim.

The Leo editor program provides a simple interface that presents all information about a project in four areas (Figure 1). In the upper left, the outline view shows all the documents belonging to a project. To the right is the log with all the actions that occurred in Leo. The various tabs call up more functions for the log, such as a search or notifications of specific tasks. Below it are the content indicators for the files. Depending on the type of file, the lower part divides again into the overview of the file contents.

Figure 1: The Leo window with its four areas provides a good overview of a project, its contents, and changes in the log.

Installation

Because the Leo editor is a Python program, it doesn't necessarily need installation. That said, the directions on the homepage are not very helpful and, as the Ubuntu PPA isn't quite up to date, you may have to follow these instructions carefully to get everything working.

Once you download the sources from GitHub, you can use the leo-install.py script in the directory to set up Leo. But, you can also do without it. You only need to give your system the path to the Leo directory and you should be able to execute it from anywhere:

$ PATH=${PATH}:${HOME}/leo-4-11
$ export PATH

Next, start the software with python launchleo.py . The prerequisite is a Python installation along with the PyQt package, which most installations already have. If any of these two dependencies are missing, install them in the usual way using the package manager. The complete settings management is in Leo format (Figure 2). The configuration file is itself a Leo project, which is a good indicator of its basic work mode. After all, Leo's direct access to the Python data allows it to be modified and enhanced at will, which also applies to the settings.

Figure 2: The editor settings themselves are implemented as a Leo outline. This makes almost all parameters adaptable and they can be automated through Python scripts.

Work Mode

The editor first collects texts and saves them as text files in a .leo file. To ensure that Leo knows during saving and exporting how to handle files, it marks them with directives. Apart from this particularity, Leo is not distinguishable from other programming environments and works similarly to any other IDE-cum-text editor. However, you may become more a part of the action with Leo when using Python, because you can customize the application to your needs while at the same time working on other projects.

If you want to use your favorite editor together with Python, maybe because its file management suits you, nothing stands in your way. You can integrate Leo into Emacs with a Pymacs script and then work in Emacs with the Leo data and commands. With Vim, it's just the opposite, because Leo by default has a series of built-in Vim commands.

You can integrate other programs with Python background with the Leo editor through the leoBridge module or the IPython bridge.

Buy this article as PDF

Express-Checkout as PDF

Pages: 2

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content