spacemacs

Spacemacs docs: http://develop.spacemacs.org/doc/DOCUMENTATION.html http://develop.spacemacs.org/layers/+lang/clojure/README.html https://practicalli.github.io/spacemacs/
2020-03-11T00:50:06.149300Z

How do you delete the surrounding sexp, but keep the inner ones?

2020-03-11T00:50:11.149500Z

with smartparens ?

2020-03-11T00:50:33.150Z

Like say I have:

(do (foo)
    (bar)
    (baz))
and I want:
(foo)
(bar)
(baz)

2020-03-11T00:52:08.151Z

What I do now is sp-unwrap-sexp which gets rid of the outer parenthesis, and then I manually delete do. But is there a command that would also delete do ?

practicalli-john 2020-03-11T09:43:05.155Z

@didibus SPC k r on a child (nested) expressions will replace the parent expression with the child. Unfortunately this will kill any other child expressions, so not quite what you want 😞

2020-03-11T11:01:59.156100Z

(do |(foo)
    (bar)
    (baz))
with my cursor before (foo) if I do SPC k E it should give what you want

👍 3
zane 2020-03-11T15:43:47.159800Z

Does anyone else find it awkward to insert an org-mode link at the end of a line? Since links get inserted before the point, and since you must be in normal mode to insert a link, the only way I've come up with to insert a link at the end of a line is: 1. a to enter insert mode after the current character

A link:
       ^
2. <SPC> to add a placeholder space
A link: 
        ^
3. <ESC> to enter normal mode, with the cursor on the placeholder space
A link: 
       ^
4. ,il to run org-insert-link
A link:<https://www.spacemacs.org> 
                                ^
5. x to delete the placeholder space
A link:<https://www.spacemacs.org> 
                               ^
Curious whether anyone else has a better way.

practicalli-john 2020-03-11T16:28:09.166100Z

I usually type the text of the link first, then use v or SPC v to highlight that text. Then , i l after I enter the URL the link text is already populated, so I just press RET .

zane 2020-03-11T16:49:21.166800Z

Got it. Do you have a similar workflow for when you want the text to be the title of the webpage?

zane 2020-03-11T16:50:02.167200Z

i.e. org-cliplink-like behavior

practicalli-john 2020-03-12T14:47:58.167700Z

I've never used that function, seems handy though. If its in the body of a text, I would just create an extra space before using it. Or if I forgot, insert the link without the space and use F [ to jump back to the start and i to insert a space.