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

please don't bind C-<left, right> #543

Closed
fommil opened this issue Nov 26, 2015 · 7 comments
Closed

please don't bind C-<left, right> #543

fommil opened this issue Nov 26, 2015 · 7 comments

Comments

@fommil
Copy link
Contributor

fommil commented Nov 26, 2015

I do this after loading the default bindings

  (bind-key "C-<left>" nil smartparens-mode-map)
  (bind-key "C-<right>" nil smartparens-mode-map)

and I think it catches out many people who I introduce to smart-parens. These key bindings are a little too popular for other purposes to be rebound the way you're doing, IMHO.

@Fuco1
Copy link
Owner

Fuco1 commented Nov 26, 2015

I'm not binding anything, you have to enable it in customization. If you enable them, the bindings follow paredit.

Smartparents supports customizable "keybinding sets", if you think there is some which would be better for beginners, I'm happy to add third type.

See the variable sp-base-key-bindings.

@fommil
Copy link
Contributor Author

fommil commented Nov 26, 2015

I mean specifically in the default call to (sp-use-smartparens-bindings)

@Fuco1
Copy link
Owner

Fuco1 commented Nov 26, 2015

Okey, I still think it would be better to add another set or customization option. If only with respect to compatibility and my own selfish lazyness.

For the paredit users there's the paredit set, for users who want something like paredit but not quite (e.g. never used paredit so they don't care) there is the smartparents set which is basically what I use (with some changes wrt paredit which I didn't quite like). I don't know what C-<left> should do otherwise, so I can't argue about that with you. But I see no problem with some "CUA" set or whatever we want to call it.

@fommil
Copy link
Contributor Author

fommil commented Nov 26, 2015

yeah, that'd be great! And since its the one that newbies will likely see, can it be the default? :-D

FYI, these are the bindings I use

  (bind-key "s-<delete>" 'sp-kill-sexp smartparens-mode-map)
  (bind-key "s-<backspace>" 'sp-backward-kill-sexp smartparens-mode-map)
  (bind-key "s-<home>" 'sp-beginning-of-sexp smartparens-mode-map)
  (bind-key "s-<end>" 'sp-end-of-sexp smartparens-mode-map)
  (bind-key "s-<up>" 'sp-beginning-of-previous-sexp smartparens-mode-map)
  ;; sp-next-sp could be better https://github.com/Fuco1/smartparens/issues/541
  (bind-key "s-<down>" 'sp-next-sexp smartparens-mode-map)
  (bind-key "s-<left>" 'sp-backward-up-sexp smartparens-mode-map)
  (bind-key "s-<right>" 'sp-down-sexp smartparens-mode-map)

@fommil
Copy link
Contributor Author

fommil commented Mar 14, 2016

did you ever do anything on this? I've added a recommendation section to the ensime docs telling people to install smartparens 😄 http://ensime.github.io//editors/emacs/hacks/#smart-parentheses

@Fuco1 Fuco1 modified the milestone: Backlog Jun 14, 2016
@Fuco1
Copy link
Owner

Fuco1 commented Oct 20, 2016

Hi. Are you still interested in this?

@fommil
Copy link
Contributor Author

fommil commented Oct 20, 2016

yup, it would be great to remove these from the default binding.

@fommil fommil closed this as completed Sep 1, 2018
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