https://github.com/eshrh/campus-emacs
simple and sane approach to repl programming
https://github.com/eshrh/campus-emacs
Last synced: 6 months ago
JSON representation
simple and sane approach to repl programming
- Host: GitHub
- URL: https://github.com/eshrh/campus-emacs
- Owner: eshrh
- License: gpl-3.0
- Created: 2022-12-15T08:39:04.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-17T04:09:36.000Z (over 2 years ago)
- Last Synced: 2025-08-02T21:48:15.882Z (12 months ago)
- Language: Emacs Lisp
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* Campus-emacs
Campus is a simple but effective improvement to the inferior-process
repl development experience in emacs.
Essentially, campus offers three main functions:
- =campus-make-partition=: inserts a special comment that breaks the
existing code-section (at first the whole file) into two parts.
- =campus-make-partition-from-region=: delimits the selected region with
the special partition comment. This operates somewhat like a cell in
an interactive notebook.
- =campus-send-region=: sends the code-section you're in to a repl
process using a customizable list of commands.
I find this useful when developing with a repl open and
- I don't want to re-evaluate the whole file every time
- My code isn't in a single function, so I can't use =C-M-x=.
- I find myself selecting a region and using =C-c C-r= or the
equivalent frequently.
[[https://youtu.be/Vu_0vRgxZPs][video demo]]
* Installation
Installable via straight like this:
#+BEGIN_SRC emacs-lisp
(straight-use-package
'(campus :type git
:repo "https://github.com/eshrh/campus-emacs"))
#+END_SRC
The source is self-contained in =campus.el= and depends on =s= and
=dash=.
* Customization
Two main things to customize:
- =campus-partition-string=: the comment string used for partitions.
- =campus-eval-region-alist=: map of functions to use to eval code.
- see the docstring via =C-h f= or reading the source for more
info