This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-01
Channels
- # announcements (7)
- # babashka (41)
- # beginners (117)
- # cider (3)
- # clj-kondo (145)
- # cljdoc (25)
- # cljs-dev (19)
- # clojure (197)
- # clojure-dev (14)
- # clojure-europe (4)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-spec (11)
- # clojure-uk (21)
- # clojuredesign-podcast (5)
- # clojurescript (29)
- # code-reviews (4)
- # cursive (87)
- # data-science (11)
- # datomic (29)
- # duct (2)
- # emacs (10)
- # graalvm (1)
- # lumo (13)
- # malli (2)
- # nrepl (5)
- # off-topic (25)
- # onyx (1)
- # pathom (6)
- # reagent (20)
- # reitit (4)
- # rewrite-clj (7)
- # shadow-cljs (114)
- # spacemacs (16)
@jack.crawley92 this is what i came up with:
(defun join-to-previous (prefix)
(interactive "p")
(save-excursion
(evil-previous-line prefix)
(dotimes (var prefix)
(join-line 1))))
(define-key evil-normal-state-map (kbd "K") 'join-to-previous)
Oh - convention for custom defuns is to use my-
or your username (or a contraction of it) as the prefix, to avoid potential namespace clashes.
👍 4
weirdly, calling (evil-join (- (line-number-at-pos) prefix) (line-number-at-pos))
did not work. it joined lines 14 and 15 even though i was at like line 447 in the file.
Yeah, looks like a restriction of the macro used to define evil commands. Does seem a bit opaque.