Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable spacemacs/default-pop-shell like behavior for mode specific REPL's #2029

Closed
luxbock opened this issue Jun 16, 2015 · 6 comments
Closed

Comments

@luxbock
Copy link

luxbock commented Jun 16, 2015

I'd like to propose that for languages that support a REPL inside Emacs, the mode specific evil-leader binding (i.e. , ') should pop it up and behave similarly as the SPC ' binding behaves with shell:

  • If no REPL buffer is running, it one should be created.
  • If a REPL is running but not visible, it should pop-up the same way the shell does.
  • If a REPL is running and visible, , ' should focus that window.

I can give a go at implementing this for Clojure if there's no objections to it.

@bmag
Copy link
Collaborator

bmag commented Jun 16, 2015

Would be nice to hit , ' instead of , s i (in Python) 👍

IIRC, C-c C-z is the convention in Emacs for opening a REPL, so most of it should already be implemented.
If the window doesn't open where you want it (bottom of the screen, I assume), I think you'd probably want to look at display-purpose-alist.

Also, shouldn't , ' close the REPL if used from inside the REPL?

@luxbock
Copy link
Author

luxbock commented Jun 17, 2015

With display-purpose-alist I assume you are refering to #1958? We probably can't rely on that given that it's a layer and not enabled by default.

Yes , ' should close the REPL if called from inside the REPL buffer.

@bmag
Copy link
Collaborator

bmag commented Jun 17, 2015

Oh sorry, I got confused somehow 😞 I meant display-buffer-alist. My apologies.

@syl20bnr
Copy link
Owner

But how can we discriminate between the REPL and a regular terminal if both are under SPC ' ? I like the idea but we need a new key binding for the REPL.

@bmag
Copy link
Collaborator

bmag commented Jun 22, 2015

@syl20bnr I don't understand what you mean. There will be two distinct bindings:
SPC ' for terminal
, ' for REPL
I've managed to implement such behavior for python and emacs-lisp (ielm) in my personal config, but I've used window-purpose for it. I could try doing it without window-purpose, though.

Also, I thought it might be nice if , ' in Dired buffers would open the recently used REPL, but I'm not sure if it's really useful.

@d12frosted
Copy link
Collaborator

Fixed with released of Spacemacs v0.200. Let us know if you still have any problems with this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants