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

Enhance evil-lisp-state #1955

Closed
tuhdo opened this issue Jun 11, 2015 · 5 comments
Closed

Enhance evil-lisp-state #1955

tuhdo opened this issue Jun 11, 2015 · 5 comments
Labels
Enhancement ☺ Evil-lisp-state stale marked as a stale issue/pr (usually by a bot)

Comments

@tuhdo
Copy link
Contributor

tuhdo commented Jun 11, 2015

Currently, getting into the lisp state takes too many keys (4 keys for Emacs to C-c k <something>). That's why I'm using Lispy. We can make it better:

  • Adapt its key bindings for Emacs users. Serious, I like it but I cannot use it like this. Just f/b/n/p is enough. Slurp can be replaced with > and barf with < to free the key bindings.
  • Make use of avy/ace (we should remove ace-jump-mode really). In Lispy, I can press q to jump to any open parenthesis in current defun. It's really convenient.
  • Similarly, I can remove any symbol and jump to it with H in current defun.
  • Lispy provides two handy commands: lispy-knight-up and lispy-knight-down that allows me to jump up/down the next sexp on the next line. If the next sexp is a bigger scope, jump up to it. For example:
(when (or (equal (user-full-name) "tuhdo")
            [](equal (user-full-name) "tudo"))
    (smartparens-global-strict-mode))

Point is []. When I use lispy-knight-up, it jumps to the parenthesis at when and when use lispy-knight-down, it jump to the parenthesis on the next line.

  • [ and ] should just jump to beginning and end of defun. It is currently unbound.
  • e to eval current sexp at current parentheses.
  • For holy-mode, we should add a 2-keys binding i.e C-] to get into lisp state quickly.
@syl20bnr
Copy link
Owner

It seems that 4 keys is a lot but it is not in practice, the issue is that evil-lisp-state is meant to be used in Vim style, it has never been thought to be used in Emacs style.

In Vim style the user is most of the time in normal state, then SPC k can really be viewed as one keystroke once the muscle memory is done.
Once SPC k is pressed we are in lisp state so it is not required anymore for the following manipulations.

What I want to experiment is to use Lispy but with the following changes:

  • the state is not defined by the position of the point
  • SPC k enter Lispy state
  • Tweak Lispy to be more compliant with Vim in Vim style

There is a package that partly does this I believe, we should give it a try.

@sooheon
Copy link

sooheon commented Jun 12, 2015

I like the idea of extending lispy with a more vi compliant key theme (which could be PRed upstream as a drop in alternative to the special lispy key theme. Curious what is the package that partly does this?

@kingcons
Copy link
Contributor

This might be the package @syl20bnr was thinking of: https://github.com/bcarrell/evil-lispy

@justbur
Copy link
Contributor

justbur commented Jan 13, 2016

@syl20bnr suggested in chat that for holy-mode users we could have M-m k toggle lispy. What do you all think of that?

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ☺ Evil-lisp-state stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

5 participants