https://github.com/bobbicodes/bob
Clojure console editor written in pure C with REPL support, syntax highlighting and search
https://github.com/bobbicodes/bob
c text-editor vt100
Last synced: 3 months ago
JSON representation
Clojure console editor written in pure C with REPL support, syntax highlighting and search
- Host: GitHub
- URL: https://github.com/bobbicodes/bob
- Owner: bobbicodes
- Created: 2018-03-24T00:02:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-17T20:10:37.000Z (almost 7 years ago)
- Last Synced: 2025-04-14T04:09:24.113Z (6 months ago)
- Topics: c, text-editor, vt100
- Language: C
- Homepage:
- Size: 1.07 MB
- Stars: 18
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bob the Editor!

[Watch screencast](https://youtu.be/f_1ZLgQtaWg)
## "Can we build it?"
>"Derp de derrrrr!"
It takes like 2 seconds, all you need is a C compiler. To check if it's there type:$ cc --version
Install it (if needed) with:
$ sudo apt-get install gcc make
# Build Bob
Download bob.c and (from its directory) enter:
$ make bob
# Install Bob
Put the binary on your $PATH to install Bob:
$ mv bob /usr/local/bin/bob
# Use Bob
$ bob [FILENAME]# Clojure evaluation
* Run the `repl` script (set to executable with `chmod +x repl`) to connect to a Clojurescript REPL via JavaScriptCore.
You must have `inotifywait` installed on your machine, as well as [Planck](http://planck-repl.org/).* Pressing **Ctrl+e** evaluates the whole buffer and prints the result of the last expression.
# What I wanted
A truly minimal console-based text editor that a beginning programmer can easily read, comprehend and modify.
Then when I started writing Clojure full-time I wanted to be able to evaluate code right from the editor.## What I actually wanted
When people tell me to use a certain text editor - to be able to punch them in the face and say,
>"I use BOB, biotch."# TODO:
Try on Windows or Mac and add specific instructions if needed.
Figure out how to use pREPL and show results right in status bar. Doing eval by hijacking Planck is an obviously hacky solution and would be nice to bring this functionality into the editor itself.
# Credits
Based heavily on the [Kilo](https://github.com/antirez/kilo) editor with a Clojure layer added for the syntax highlighting and REPL eval. If you're interested in learning more about how the code works you should definitely check out [Snaptoken's tutorial]( https://viewsourcecode.org/snaptoken/kilo/). The unique and remarkable part about it is that it does not depend on ncurses, or any library, which means there's not even a need for a `Makefile`.