Pasta

This project is an early and experimental attempt at a new kind of text editor. The current version does not do much of anything interesting except allowing you to edit some text files in multiple tabs and horizontal panels (“pans”), with syntax highlighting for a few languages.

Visit the #pasta channel on irc.freenode.net to chat.

Installation

The source and bug tracker are hosted on Launchpad:

To get the source, use Bazaar:

$ bzr branch lp:pasta

Pasta requires Python, PyQt4, and PyYAML. On Ubuntu:

$ sudo apt-get install python-qt4 python-yaml

There is no installer at this time; simply run pasta.py from the project’s root directory.

Objectives

While it may not look like much yet, Pasta is intended to eventually be a text editor unlike any other. The spark that inspired its development was a simple idea–using color-coded ribbons within and between text files to indicate relationships and structure.

For example, you are probably familiar with text-diff viewers that highlight the added, removed, and modified lines in a file, making it much easier to visualize differences. Some of the nicer diff viewers show two or three files or file versions side-by-side, with color-coded areas between them showing where text was expanded (added), collapsed (removed), or altered.

Pasta aims to expand on this concept, but in a much more generic way.

  • If you search in file A for text “foo”, connect the search text box to all occurrences of the text in file A.
  • If file A calls a function that’s defined in file B, show A and B side-by-side, and connect the function call to its definition
  • If file A references file B, either directly (string literal) or indirectly (like a Rails controller rendering a view), connect the reference in file A to the top of file B.

Every good text editor supports syntax highlighting–color-coding of key words and structure within source code. But this normally uses only foreground color; few editors do anything significant with background color, and it’s that realm that Pasta will explore.

Design

The svg directory contains several preliminary design sketches. Some of the terminology is different from what you’ll find in the source code, but they should give you a glimpse of some of the concepts I’d like to explore with Pasta.

API

Indices and tables