This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-18
Channels
- # aleph (59)
- # beginners (21)
- # bigdata (1)
- # boot (110)
- # cider (7)
- # clara (1)
- # cljs-dev (160)
- # cljsjs (3)
- # clojars (10)
- # clojure (122)
- # clojure-czech (2)
- # clojure-dusseldorf (5)
- # clojure-france (1)
- # clojure-italy (4)
- # clojure-korea (5)
- # clojure-russia (13)
- # clojure-spec (15)
- # clojure-uk (78)
- # clojurebridge (1)
- # clojurescript (196)
- # core-async (6)
- # core-logic (27)
- # cursive (11)
- # data-science (2)
- # datomic (45)
- # dirac (9)
- # emacs (2)
- # funcool (8)
- # hoplon (16)
- # immutant (13)
- # jobs (1)
- # klipse (11)
- # lein-figwheel (1)
- # leiningen (1)
- # off-topic (3)
- # om (40)
- # onyx (31)
- # pedestal (25)
- # re-frame (55)
- # ring (1)
- # ring-swagger (1)
- # rum (4)
- # specter (1)
- # sql (2)
- # untangled (30)
- # vim (12)
- # yada (12)
Wanted to share this little trick I've been using lately, I want to make it take a mark as a parameter.
I work on this big project, where a refresh can take around ~20s. My solution is obviously just to re-evaluate the function I'm working on, so I came up with this little mapping: nmap <localleader>ap
a<Plug>FireplaceCountPrint<C-o><C-o>` It can easily be optimized (C-o*2 should be for example).. The gist of what it does is jump to mark a, evaluate there, and come back.
I sometimes need two of these mappings, depending on what I am doing. So right now I am tweaking a function, and I do
,bp
to re-eval it, followed by ,ap
to jump to a (comment)
I wrote and evaluate that to check it's result, and go back to where I was.
This keeps the feedback loop really short — I love it
Is FireplaceCountPrint what usually happens with cpp
?
@markwoodhall yep, but you can't map a map, I think was what tpope said
LOL! So you put a mark on a defn
or something and that snippet jumps to the mark, does the equivalent of a cpp
and takes you back to where you were?
Nice!
Apparently some people created a custom version of cp
which let you do things like cpaf
without losing your position, which is a really nice tweak.
Can you go to the outer most expression, instead of using a mark?
Yeah. Cool!
https://github.com/tpope/vim-fireplace/issues/107 I discovered this, late into my journey.
What a sentence, "I edit drum sequences in vim". 🤓