Skip to content

A simple terminal-based text editor written in Janet. [WIP]

License

Notifications You must be signed in to change notification settings

CFiggers/joule-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Joule editor

A simple terminal-based text editor written in Janet. Inspired by (but not a full faithful recreation of) this guide by paigeruten.

joule-0 0 4-a-demo

Features

Finished (at least mostly):

  • TUI text editing (file loading, editing, saving)
  • Lightweight executable
  • Mobile-friendly (e.g. in Termux on Android)
  • Syntax highlighting (for supported languages)
  • Mouse support (clicking and scrolling)
  • Basic search

Planned:

  • Unlimited undo/redo history
  • Command palette
  • Persistent configuration (via dotfile)
  • Multiple files open at once
  • Multi-cursor editing
  • RegEx find and find + replace
  • Plugin system

Getting Started

Building from Source

Requires Janet and JPM. Not tested on Windows.

  1. Clone this repo (for e.g., with the GitHub CLI, $ gh repo clone CFiggers/joule-editor.)

  2. Change directories into the cloned repo: $ cd joule-editor

  3. Fetch and install required dependencies: $ jpm deps (on Ubuntu and similar systems, may required elevated permissions, e.g. $ sudo jpm deps)

Now you can either build a native binary executable using $ jpm build or run the Janet source code directly using the janet command and passing in the src/joule.janet source file.

  • To Build a Native Executable:
    • $ jpm build
    • $ ./build/joule
  • Or to Run as a script using Janet:
    • $ janet src/joule.janet

Usage

Joule is not a modal editor, meaning you can immediately start typing to make edits without needing to enter a specific editing mode (like vi and vim).

Keyboard Shortcuts

Binding Action
Ctrl + q Quit
Ctrl + l Load File
Ctrl + s Save
Ctrl + a Save As
Ctrl + f Find
Ctrl + g Go To Line
Ctrl + c Copy (to internal clipboard)
Ctrl + x Cut (to internal clipboard)
Ctrl + p Paste (from internal clipboard)
Ctrl + n Toggle Line Numbers
Ctrl + w Close Current File
Ctrl + d Open Debug REPL
Shift + Del Delete current line

Copyright

Copyright (c) 2022 Caleb Figgers

About

A simple terminal-based text editor written in Janet. [WIP]

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages