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

added helm-everywhere contrib #63

Closed
wants to merge 1 commit into from
Closed

added helm-everywhere contrib #63

wants to merge 1 commit into from

Conversation

danielwuz
Copy link
Contributor

A contribution to use helm as much as possible. I copied most of the settings from prelude without guilty, as I had similar settings before and I changed some settings to match my workflow.

Still need to add a README, just want to throw it out and get some feedback.

@trishume
Copy link
Contributor

trishume commented Nov 2, 2014

cool 👍

Sidenote: your commits show up as @dawuwgen instead of @danielwuz. Might want to adjust your git email.

@syl20bnr
Copy link
Owner

syl20bnr commented Nov 2, 2014

helm is at the core of spacemacs and I don't want to put it in an optional layer, this mode is so essential that it must be part of sane defaults, at least in spacemacs.

So I want to incorporate some changes of your PR in core. I will not introduce C-x key bindings prefixes in spacemacs though, the ergonomic of spacemacs is based on Vim modes, the space bar as the leader and mnemonic and easy to type keys, so we have to find key bindings that fit this approach.

Some of the proposed bound commands are already in spacemacs:

  • helm-M-x is <SPC> : (mimic Vim ex commands)
  • helm-show-kill-ring is <SPC> k i l (this one is funny)
  • helm-mini is <SPC> b s (buffer switch)
  • helm-find-files is not used because I prefere ido for this (see readme for more info on this) on <SPC> f f but you can remap it to use helm instead.

The rest of the key-bindings don't exist in spacemacs and I will be happy to incorporate it if they fit the ergonomic of spacemacs ;-)

@danielwuz
Copy link
Contributor Author

Thanks for your quick response. I understand the spirit of spacemacs, and I think it makes sense to keep key strokes as simple as possible. This is why I made those bindings as a contrib just for those who loves helm as much as I do:)

In terms of key bindings, I'm okay with not taking all of them, but there're couple that in my opinion, are quite handy.

  • bind helm-M-x to M-x: I really like this binding because M-x is an essential to Emacs editor and helm enhanced it by showing corresponding key bindings along each command. Another good thing about M-x is that it works for all buffers and all modes where SPC key might not work, e.g. info mode in info buffer.
  • bind helm-show-kill-ring to M-y: I found this is handy because if you're in insert state, you don't have to switch to normal mode in order to hit leader key. And also for this one, I had hard time to remember the key stroke sequence of a command that requires 3 levels, not including the leader key.
  • helm-occur: better replacement of the default occur
  • helm-apropos: better than default apropos-command

@danielwuz
Copy link
Contributor Author

@trishume thanks for pointing out. I didn't even notice myself =)

@syl20bnr
Copy link
Owner

syl20bnr commented Nov 2, 2014

@danielwuz Good point on all of this, helm-M-x should already be triggered when you M-x it is not the case ? Just tested it and it was helm instead of smex that was used.

M-y is the Emacs way, in Vim it may be C-R but this binding is painful. I would set in on <SPC> y in core, fd <SPC> y is not an issue for this case. As you noted I prefer the modal approach because it makes things consistent and it is just a matter of muscle memory with very easy keystrokes on all keyboards.

You are free to set in on M-y in your ~/.spacemacs.

apropos and other help commands can be bound to prefix <SPC> h (see https://github.com/syl20bnr/spacemacs#help-commands).

Your PR made me think of a nice feature to have: being able to tansform spacemacs in a raw emacs in just a few keystroke. It could be a very valuable tool for pair programming. It can be as simple as set the emacs state from evil to something more elaborate which can used your proposed "emacs way" of integrating helm.

@syl20bnr
Copy link
Owner

syl20bnr commented Nov 2, 2014

C-y may be a good pick though because C-j and C-k are used to select the candidate from helm

@danielwuz
Copy link
Contributor Author

@syl20bnr There must be something wrong in my local, helm buffer doesn't show up until the first time I execute helm-M-x. When I hit M-x after emacs started, emacs runs the command execute-extended-command and I get "raw" emacs M-x behavior(not even smex). I'll look into this into more detail, it might be caused by my local settings.

After these discussion, I feel I should get myself more familiar with the vim way, as I came along from an emacs background, so still think in the way as a emacsen =). I'll let this PR go. Thanks so much for your time and patient as well as all the useful information.

@danielwuz danielwuz closed this Nov 3, 2014
@syl20bnr
Copy link
Owner

syl20bnr commented Nov 3, 2014

Sorry, I have the same behavior as yours. So the key bindings M-x will resolve this. PR accepted.

I also accept to put helm-kill-ring on C-y (not M-y) because it fit nicely with C-j and C-k to select a helm candidate. We can also put it on <SPC> y.
Technically though it should be on C-p since in Vim it's p to past and yank is for copy :-)

@danielwuz danielwuz deleted the helm-everywhere branch February 23, 2015 14:42
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

Successfully merging this pull request may close these issues.

4 participants