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

Bind enter in :emacs #184

Open
mwgkgk opened this issue Feb 5, 2019 · 1 comment
Open

Bind enter in :emacs #184

mwgkgk opened this issue Feb 5, 2019 · 1 comment

Comments

@mwgkgk
Copy link

mwgkgk commented Feb 5, 2019

A snippet from #101 (comment) doesn't seem to work for me:

{:key-bindings {:emacs [[(13) :clojure-force-accept-line]]}}

"^M" does not work either. "^G", for example, does work. It's okay to force-accept on plain enter because ctrl-j is also bound to accept-line. The functionality itself does work, on "^X^M".

Tested on xterm, urxvt, alacritty, in and out of tmux; Rebel-readline version 0.1.4.

Bonus round: Can't seem to bind "^J" either, both like that (which is how it's listed in :repl/key-bindings), nor as "^@" (which is what Vim gives me on C-v C-j, which inserts the terminal code for ctrl-j).

Also might make sense to allow force-accept on enter through an option. This sounds like a point of confusion. I understand that there's been a lot of thought put into this given the discussion in #101, but since C-j is duplicating accept-line, Enter could act closer to what is expected from a line editor, not from text editor.

@cldwalker
Copy link

Fwiw https://github.com/cldwalker/dotfiles/blob/master/.clojure/rebel_readline.edn works for me with emacs keybindings on osx with iterm2

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

No branches or pull requests

2 participants