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

i behaves differently, when sexp is marked #18

Open
abcdw opened this issue Feb 23, 2017 · 8 comments
Open

i behaves differently, when sexp is marked #18

abcdw opened this issue Feb 23, 2017 · 8 comments
Assignees

Comments

@abcdw
Copy link

abcdw commented Feb 23, 2017

i have different meaning, when I mark something( and I have to use f.
It seems inconsistent. Probably it's necessary to remap i to lispy-flow in "mark-mode".

@mikavilpas mikavilpas self-assigned this Mar 3, 2017
@mikavilpas
Copy link
Owner

Yep, I agree. It's pretty confusing. I'll see what I can do about it.
Thanks for reporting!

@mikavilpas
Copy link
Owner

Hmm actually I don't kind of understand any longer. Could you describe your issue with some example?

@abcdw
Copy link
Author

abcdw commented Mar 3, 2017

(do|
  (something)
  (here))

try to do following:
) i m l i
and
) i m l f

@mikavilpas
Copy link
Owner

Hmm.. Here's what happens for me in the first case:

(do|
  (something)
  (here))

;; ) i m l i

(do
  (something)
  (here)|)
;; the (do) form is selected until |, leaving the final ")" unselected

For the second case,

(do|
  (something)
  (here))

;; ) i m l f

(do|
  (something)
  (here))
;; the "do" symbol is selected

The first case works as I expect it to, although I don't think it's correct to leave the final ) out of the selection.

As for the second case, it's a bit surprising I agree. I looked it up, and it seems this is actually a feature of lispy: http://oremacs.com/lispy/#lispy-tab . So if the region is active, it is actually supposed to jump and select the car of the form.

@mikavilpas
Copy link
Owner

In my use case I rarely use f to fix indentation. What I use instead is https://github.com/Malabarba/aggressive-indent-mode

It corrects the indentation as I type, so I don't have to think about it. Do you think it could work for you as well?

Here's my config for using it: https://github.com/sp3ctum/spacemacs/blob/mika/.spacemacs#L420

@abcdw
Copy link
Author

abcdw commented Mar 4, 2017 via email

@mikavilpas
Copy link
Owner

It seems to me this is an issue with lispy itself.

It could be rebound to another key, but it would require extra complexity.. it seems to me like lispy doesn't actually use a different keymap when the region is active. Instead each command handles the case individually and I don't see a good way to customize this.

If you'd like to continue the discussion, can you clarify what it is that you're actually trying to accomplish?

@abcdw
Copy link
Author

abcdw commented Mar 4, 2017

Ok. lispy seems to have a little bit strange behavior, when mark is activated.
For me, when sexp is marked it will be nice to mark inner sexp with lispy-flow.
I thought that lispy-flow does that job and you just forgot to remap i to lispy-flow in "marking mod", but I was wrong. lispy-flow doesn't care about proper marking of sexp.

It strange, but lispy-special-tab does what I expect from lispy-flow, except one small thing: it always mark first sexp.
((first| sexp) (second sexp))

) m l f and ) m h f do the same thing.

Probably it more intuitive behavior and in "marking mode" lispy-flow should do what lispy-special-tab does(maybe with improves of case above).

Sorry for confusing.

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