-
Notifications
You must be signed in to change notification settings - Fork 23
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
vim-sexp-mappings-for-regular-people additional binds #10
Comments
I personally use lispy as much as possible, but this package can be used without lispy-mode too. As for the "on parens" thing, the commands provided by this package are consistent with evil and will put the point before/on parens (e.g. see the additional movement key theme).
I'll probably just add your extra keybindings to the vim-sexp-mappings-for-regular-people key theme since there aren't any conflicts. I think I like
Sure I can add this as well. One thing to note is that you could also do this with lispyville's delete operator (
I don't think
I'll probably make this an option. Inserting a space usually makes sense (various lispy commands do this, like the wrapping ones).
I'm planning on adding joining/splitting keybindings in a separate key theme. I'll look at the rest of your keybindings as well. |
Ah okay! Yeah I'm gonna look into lispy and your bindings some more. I've noticed that many things are already possible other ways, I'm just so used to this style of binding, so it'd be nice if we could have them around as well. Yeah the ones for killing around sound like good ideas all of them. I think Yeah |
BTW a nice binding for And it mirrors just plain |
You mentioned that you were going to be implementing vim-sexp-mappings-for-regular-people binds at some point, which is awesome. I ended up having to do it myself manually with the smartparens api because I didn't find existing packages that did it.
I'm gonna take a look at this package because I had seen other similar packages and also lispy, but lispy seemed like its own separate thing and the other packages I found for interfacing with it didn't seem all that enticing. I want to write down my ideas first though before I forget to, so it's likely that some of these things you already have covered in your package.
By the way, I found that I had to make use of the on-parens package for certain functions I created so that they would work well in evil normal mode, which is where I have these binds setup. See its readme for the rationale, which may or may not affect you. Here's an excerpt:
I added a few additional bindings for operations that I think are useful, though you can be the judge on which keys to actually bind them on. You can find the full source for this here.
I have something like:
I actually use these a lot. Say I have
(func |param thing other)
, then< u
would make itparam thing other
and> u
makes itfunc
.There's also
sp-splice-sexp-killing-around
which is useful so that it becomes justparam
. I wasn't sure what to bind this variant too though, and I do use it a lot, so I was just using the default smartparens bind for it which isC-S-Backspace
. Perhaps something like^u
but I guess^
is already taken.I bound them to the letter "u" because it feels like I'm "unwrapping" the sexp in a certain direction. Then again smartparens already has a
sp-unwrap-sexp
which literally just removes the sexp delimiters, so perhaps it may be better to go with< s
and> s
for "splice".I also have ones for deleting in a certain direction up to the sexp delimiter:
The definition of the
-backward
one for example is just:It's very useful. So if I have
(func |param thing other)
,< d
makes it(param thing other)
and> d
makes it(func)
.One other minor thing is that my binds for inserting at the beginning or end are
< i
and> i
, i.e. not< I
and> I
. It's not a big deal and I'm fine with either, just a difference I noticed.Also for
< i
I made it so that it auto-creates a space, so like if you have(one two |three)
and you do< i
, it'll leave you at(| one two three)
instead of just(|one two three)
. I'm not sure that's all that useful though or even something that one would desire all the time, but it's an idea you might want to pursue for other bindings perhaps. Then again it's not that difficult to just type out a space manually.I also created bindings for splitting sexps and joining them,
M-S
andM-J
respectively, but I guess that doesn't really go well with the whole>
and<
binds anymore so that's perhaps not all that relevant.The text was updated successfully, but these errors were encountered: