All posts tagged zed

  • Zed Update

    It’s been quiet around the Zed editor project for a while, but over the past days I’ve put some time into it again. As it turns out, I ended using it less and less over time. The reason is simple: it was too much hassle to get started editing files. The procedure always consisted of cloning the Zed repository on the remote server where I wanted to edit files, cd ing into the right directory and then firing up a Python script to start the WebFS server. Then figuring out if the server want to edit files on is directly accessible from the Zed editor over HTTP or I have to open up some ports on a firewall. Bleh. Too much hassle.

    Last week I figured out a way to improve this situation while reading a ZeroMQ book. Even though I did not end up using ZeroMQ (which is amazing by the way) to keep dependencies low, it did lead me onto the idea of a proxy solution. But before I get into the technical nitty gritty, let’s have a look at what the flow looks like now.

    Read more

  • Zed Alpha Available

    Over the past weeks I’ve written about Zed, my experimental code editor project. I explained why I started the project, why it’s a Chrome app and explained some of its design choices. Those who couldn’t wait, probably found the project already (it has been on github all along). Now it includes some basic installation instructions.

    You can download Zed from Github. Getting it setup may be a bit more involved than your average editor, because you need to run a WebFS server.

    WebFS
    WebFS is a super simple RESTful protocol that I came up with, consider it a super lightweight version of WebDAV, without the XML. It is documented here. What it does is expose a file system via HTTP, supporting PUT for storing a file, GET for retrieving a file, OPTIONS for getting file metadata (currently just an ETag, used for file watching) and DELETE for deleting a file. The protocol is as simple as can be, the Python implementation is just 128 lines of code.

    So why does Zed need WebFS? In a previous post I explained that Chrome’s APIs do not support free access the the local file system (yet). You can open individual files via a file picker, and with a bit of effort even get write access to a bunch of them, but creating new files in a directory in the user’s file system is not supported. WebFS is a way to work around this problem, but also is a natural fit for the grander vision of moving your development environment “to the cloud”. Since Zed communicates with a WebFS server via HTTP, that server may live locally or remotely. This is a key feature to me, because I often want to edit file systems running inside a VM or remote. Zed with WebFS support that easily and efficiently. Zed comes with a PHP, Python and now node.js implementation of WebFS. The PHP version supports authentication via BasicAuth, the Python and node.js version does not yet, but that should be easy to add. Reimplementing WebFS in any other language should be easy, send me a pull request if you do.

    Getting Started
    The project’s README contains basic installation instructions. Once you get the application running, you’ll notice that there’s two projects already created:

    • Settings this is where you change Zed’s settings. As described in a previous post, Zed has a special settings file system. It loads its base settings from the app/settings directory, and stores anything you put in *user*.json files in Chrome’s sync storage. For instance the default key bindings are here, and you can override them by editing /keys.user.json.
    • Manual this is a read only project that eventually will contain more documentation about the editor. It retrieves its files from app/manual, which is just a bunch of Markdown files, you navigate it either using the usual Cmd-E/Ctrl-E or by moving your cursor to a file name and pressing Cmd-Shift-E/Ctrl-Shift-E to jump to the file.

    As the README describes, you create a new project by just typing its name and pressing Return, you will then be asked for the WebFS endpoint you’d like to mount.

    This is alpha software

    Don’t sue me if it breaks. Please report issues in the issue tracker, or fix them yourself and create a pull request, it’s open source software after all. Also, if you create plugins for languages not already supported, please create a pull request.

    Enjoy!

  • Zed: a Status Update

    A few weeks ago I shared some thoughts on code editing. I described my spare time project to build an editor that’s a bit different and that would suit my needs. After a few weeks of on-and-off development I switched to the editor for most of my work. That means not just writing code, but also writing articles and notes — stuff that I used to do in WordPress and Notational Velocity before. The working title for the project has been Zed, which is not very original, but it seems to stick and nobody seemed to have better ideas. So for now, Zed it is.

    Read more

  • The Chrome Route

    Two weeks ago I talked about my little editor project. In the meantime work has progressed quite a bit and I’m really liking where it’s headed. However, one thing I had not yet figured out at the time was deployment: how are people supposed to get and run this editor? Since it’s all based on web technology the obvious answer would be: web browser!

    Read more

  • Rethinking Code Editing

    One thing frustrated me when I started programming 20 years ago: it’s very difficult to use any kind of software that you didn’t write, but could write yourself. There’s always something wrong, something you would have done slightly differently.

    As it turns out, 20 years later, I still have this problem from time to time. This is the reason why this blog has been quiet the past two weeks, I decided to spend my spare time writing code rather than writing prose. I’m not yet happy enough with the result to share it with the world, but I would like to talk a little bit about some of the principles behind it. Read more