Fork me on GitHub
#spacemacs
<
2016-07-20
>
reefersleep08:07:35

@zane @kasuko In my case, it would be a great feature to be able to turn on and off. I mostly work in hiccup these days, so I would prefer my default vector indentation to be the alternative to the norm 🙂 I don't require the normal one, really

reefersleep08:07:51

Until I do, off course, but then it would be excellent to be able to toggle back and forth

reefersleep11:07:01

Third question (hehe :D): Is there a lisp mode command for moving an s-expression past the next s-expression?

reefersleep11:07:45

For example:

[(sexp-a) (sexp-b)]
  ^pointer here
hit move-forward command
result:
[(sexp-b) (sexp-b)]

Chris O’Donnell12:07:50

but your pointer would need to be at the beginning of the second sexp

reefersleep13:07:18

@codonnell: that works great, but I wonder why there isn't an option to do it the other way? Since we're working on AST representations and those representations often take the shape of flat lists, I wonder why it isn't deemed a basic need to be able to switch the pointed element back and forth in the list. I've had use for it more than once, upon entering arguments in the wrong order 🙂

Chris O’Donnell13:07:02

no problem. If that's functionality you're really after, you might be able to just write that function yourself

Chris O’Donnell13:07:24

For example, someone here pasted a snippet that overrides SPC k w to be more clojure friendly (wish I'd written down who to give them credit)

Chris O’Donnell13:07:40

;; make wrapping friendly to Clojure/Pixie/Hy
  (with-eval-after-load "evil-lisp-state"
    ;; undef SPC k w so we can generalize it
    (evil-leader/set-key "kw" nil)
    ;; wrap using SPC k w ([{
    (evil-leader/set-key "kw("
      (lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "(")))
    (evil-leader/set-key "kw["
      (lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "[")))
    (evil-leader/set-key "kw{"
      (lambda (&optional arg) (interactive "P") (sp-wrap-with-pair "{"))))

reefersleep13:07:23

I'm completely new to emacs-lisp, but I'd like to give it a go if I get the time

akiva17:07:03

Spamming multiple channels with this but it’s good stuff: https://github.com/tonsky/FiraCode