Fork me on GitHub
#vim
<
2020-08-11
>
dominicm12:08:02

Our @olical is speaking at vimconf. The agenda was just released, congratulations!

🎉 21
wizard 3
dave17:08:38

ooh, i think i may attend. looks like a fun lineup of speakers/talks

dave17:08:05

i've been wanting to attend vimconf for a while now, but a ticket to japan has been a hard sell to my employer 😄

dharrigan20:08:52

You know if you have a form akin to this (-> (foo bar) (baz qux)) and you want to delete the outer form, i.e., the (-> ...) and (possibly) shift (foo bar) (baz qux) to align left, is that doable? btw, the outer form could be anything, like (when (a b) (c d)), so in this case, the (when ...) would be removed, leaving the (a b) (c d) intact.

noisesmith20:08:55

I use vim-sexp to move the close paren two forms to the left, then d% to remove (->) that remains

noisesmith20:08:05

there's probably something more elegant

dominicm21:08:45

<loadleader>@ will delete the outer () then I dae the ->

🎉 3
samoleary21:08:13

If you visually select the (foo bar) (baz qux) then you can <localleader>o and the selection will take the place of the outer form. I don't have a nifty way of selecting the two inner forms though...

🎉 3
noisesmith22:08:16

v- visual iF - inner form

samoleary16:08:29

Thanks, that's closer. The selection also includes -> but I'll be using viF more often now :thumbsup:

noisesmith17:08:39

there's also aF to include the outer parens, and af to select inner rather than outer form

noisesmith17:08:16

I like to stick to the action / qualifier / thing combos because they reduce the number of things I need to memorize to do things in few keystrokes

walterl22:08:38

#TIL <localleader>@ and <localleader>o. (There are too many sexp mappings to remember 😓.) Thanks guys!

walterl22:08:50

As for selecting forms, I find the WORD motions vim-sexp-mappings-for-regular-people most comfortable for that https://github.com/tpope/vim-sexp-mappings-for-regular-people#motion-mappings

samoleary22:08:00

Ah yes, looking at those motions v2E<localleader>o with the cursor on the opening bracket of the first form should do it!