Hello, intrepid Lisper! You've stumbled into a project I started around 2018 which has since been completely superseded!
You should use Conjure instead, it's the descendent of this project and is far more advanced. It (at the time of writing) has support for the following languages with more to come:
- Clojure + ClojureScript
- Fennel
- Janet
- Hy
- MIT Scheme
- Guile
- Racket
It's built in Fennel, a Lisp compiled to Lua, using Aniseed and it's actively maintained. I promise that Conjure's UX will make working with MIT Scheme so much more pleasant.
If that hasn't convinced you, please do continue to read, this plugin still works (I think), but I think you'll love Conjure.
Regardless, have a great day!
@Olical
Warning: Currently depends on vim-sexp for selecting forms.
This plugin allows you to evaluate Scheme from within your buffer. It delegates evaluation to an mit-scheme REPL started by a Vim/Neovim :terminal command.
I wrote this tool to make working through SICP easier, I thought I'd put it out there for use by other Lisp enthusiasts that can't (or won't) leave their beloved modal environment of choice.
Since I'm a Clojure developer by day (and night), I named the commands and bindings after vim-fireplace.
Use your favourite plugin manager, mine is vim-plug.
Plug 'Olical/vim-scheme', { 'for': 'scheme', 'on': 'SchemeConnect' }
" You'll need vim-sexp too for selecting forms.
Plug 'guns/vim-sexp'
" And while you're here, tpope's bindings make vim-sexp a little nicer to use.
Plug 'tpope/vim-sexp-mappings-for-regular-people'The plugin defines the following things:
- :SchemeConnectwhich starts a REPL in a terminal buffer.
- cp{motion...}evaluates the result of the motion, so- cpafis the current form your cursor is on.
- cppis a shorthand version of- cpaf, can come in pretty handy.
- <localleader>rcis bound to- SchemeConnect.
- <localleader>rrissues a restart, great for getting out of an error state.
- <localleader>reevaluates the outer most / top level form and jumps the cursor back to where it was.
- <localleader>rfevaluates the entire file and jumps the cursor back to where it was.
Note: The
reandrfmappings use thesmark for jumping back to where your cursor was at the time of the evaluation. As long as you're not using thesmark for anything you shouldn't notice. This can be remapped or even improved in a PR.
You may set g:scheme_split_size to change the size of the terminal that's created when you connect.
let g:scheme_split_size = -10Thanks to @markx you can set g:scheme_executable to change the name of the Scheme you wish to work with. If you'd like to work with Racket, for example, you can use this.
let g:scheme_executable = "racket"The plugin mappings are currently set up for scheme or racket by default, you may have to pull request in more if you'd like to use them with another filetype.
Find the full unlicense in the UNLICENSE file, but here's a snippet.
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
Do what you want. Learn as much as you can. Unlicense more software.