2

I'm a Vim user trying to learn Spacemacs. In Vim, I execute a Scheme program by typing :mit-scheme < xxx.scm. After the program exits, I can continue editing simply by press Enter.

enter image description here

However, doing this in Spacemacs (in evil mode, of course) would create a new buffer, which I have to kill manually by typing three characters: <space> b d. This is quite inconvenient for me, because I'm a inexperienced programmer who needs to execute programs very frequently while debugging.

enter image description here

How to make execute a program more efficiently in Spacemacs? For example, I want close the output window/buffer in one keystroke. I'm also glad to know if I can replace :mit-scheme < xxx.scm with some key bindings.

nalzok
  • 665
  • 6
  • 18
  • For scheme I think you could use something like Geiser http://www.nongnu.org/geiser/ which should help you do things much easier. – caisah Feb 11 '17 at 08:14
  • @caisah Seem that Geiser is shipped with the [Scheme layer](http://spacemacs.org/layers/+lang/scheme/README.html). However, when I try to use those key bindings, a `SPC m is undefined` error is thrown. – nalzok Feb 11 '17 at 08:30
  • @caisah I've installed the Scheme layer successfully! However, it only prints out the value of the last expression, while I want to see the value of *every* expression in a `.scm` file, just like what happens when I feed the whole file to a REPL. – nalzok Feb 11 '17 at 08:44

1 Answers1

1

I've got an workaround: open an terminal in Emacs with the Shell layer. After installing the Shell layer, you can toggle a shell window using SPC '​.

You can execute mit-scheme < xxx.scm in that terminal, which seems more convenient to me than using the Scheme layer

enter image description here

nalzok
  • 665
  • 6
  • 18