Skip to content

Gozala/ambiance

Repository files navigation

Ambiance

Ambiance is a simple, but fully hackable code editor. It uses HTML and it's friends for rendering and nodejs for everything else.

Motivation

I have being using vim as a primary editor for a long time & it's great! Although in a lot of cases it's being easier to start prototyping in jsfiddle or jsbin! It's just very often one needs small little hack to assist with a given task, but cost of doing is usually higher then the benefit. What if we could change that by dropping cost for quick hacks ?

More and more I find myself embedding web based code editors to empower myself with quick interactive loop when doing different experiments:

Wisp editor

wisp is a language with macros that compiles to human-readable JavaScript. It's compiler is written in wisp itself, in this process of writing wisp compiler in wisp, it was extremely useful to have a live view of compiled JS as wisp code was typed. So I hacked up a small interactive page with an embedded editor displaying JS code that's being typed will compile too. Not to say that everyone now can try wisp right in the browser to get a taste of it.

Prose

Prose is an experimental take on Literate programming, where you basically write markdown with a some code blocks that can by in arbitrary languages. Languages are identified via shebang in head of code block. Most interestingly compiler is compiled to js from readme.md file written in prose. Using any editor to do this was really painful so I cooked up codemirror mode and simple page, to write compiler in.

Solution

Ambiance is code editor that uses HTML and it's friends for rendering and nodejs for everything else. This makes it as hackable as web is! Not only that, editor is just bunch of little plugins, editor component is provided by codemirror plugin, (BTW there is no reason not to have ace plugin that could be installed to replace it), that command line interface is provided by gcli plugin and even code that reads and writes files to disk is a plugin. And plugins are just an npm packages, wanna create one ? You got all the goods from npm wanna share just publish to npm!

Screenshots

Try

There is several ways you can try this thing out, but be aware it's very unstable and far from being finished (any help is welcome BTW).

Download

If you're a mac user you can just download .dmg file.

Use node-webkit

Alternatively you can use node-webkit, to do that you'll need to first download a bulid.

Then download ambiance:

git clone https://github.com/Gozala/ambiance.git && cd ambiance
npm install

Finally ether run with node-webkit

nw .

Or make a bulid of your own.

Credits

All the credits got to an amazing open source projects without which this would not be possible:

nodejs, node-webkit, npm, codemirror, gcli

And to Svengraph who made beautiful icon with cc license that editor is using.

About

Ambiance code editor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published