J3RN / inf-elixir

An Emacs plugin for interacting with an Elixir REPL
GNU General Public License v3.0
45 stars 10 forks source link

Pop-out buffer editor #14

Open J3RN opened 1 year ago

J3RN commented 1 year ago

I frequently find myself working in IEx and needing to write some code that's longer than a single line (e.g. a module). While you can write multi-line code into IEx (either by submitting each line, the next prompt will be ...(n)>, or in inf-elixir you can hit C-M-j instead of Ret to get a newline without submitting), I think it would be nicer if there was a way to trigger a buffer opening with the current line you're editing that you can keep working in, and then submit your finished code when you're done. Also, you should be able to keep that buffer open in case you need to rewrite/update that block of code you wrote[1]

Firefox's dev tools have this feature for the JavaScript interpreter; it's triggered with C-S-b on Windows/Linux (probably C-s-b on Mac).

Firefox dev code editor

[1]: Yeah, you could also hit the up arrow until you get the block on the prompt, but that's less fun