Fork me on GitHub
#spacemacs
<
2020-12-16
>
kah0ona12:12:31

Hi folks, very basic question but: i’d like to add a binding to the clojure minor mode. Where is the preferred way to do this? I’d like , e ; to be mapped to 'cider-eval-defun-to-comment

erwinrooijakkers15:12:27

I have this:

;; Print eval sexp
  (define-key evil-normal-state-map (kbd "C-;") 'cider-pprint-eval-last-sexp-to-comment)
in dotspacemacs/user-config of .spacemacs C-; prints evaluation to comment. 🙂

kah0ona12:12:46

i assume i shouldn’t just edit /layers/+lang/clojure/packages.el (it could work of course)? Or should I fork spacemacs or something?

kah0ona12:12:30

@jr0cket (yes i’m watching your video 🙂 )

practicalli-johnny12:12:27

@kah0ona Hello, the example you gave is already a key binding. I suspect you are using a very old version of Spacemacs, i.e. version 0.200. I recommend using Spacemacs 0.300, available on the develop branch A guide to switching successfully is at https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html

kah0ona12:12:08

I just found your video and content, so I ’m guessing some studying on your blog would solve lots of questions 🙂

practicalli-johnny12:12:10

Maybe take a look at the book when you have time, or feel free to ask questions (its how I learn how to write an even better book)

kah0ona12:12:30

okay thanks

kah0ona12:12:00

congrats on the cognitect sponsoring btw, well deserved. through that post I found your video, fwiw

kah0ona12:12:42

ok thanks. i kind of started using spacemacs in 2017, but haven’t really tweaked it very much, but your vid inspired me to improve some stuff

practicalli-johnny12:12:49

I also have a Spacemacs config if you want all the settings I use. Take a quick look at the install process to see if its for you https://practicalli.github.io/spacemacs/install-spacemacs/

kah0ona12:12:18

great! much appreciated, will dive into this 🙂

practicalli-johnny12:12:29

I might need a new install version of the video now that Emacs 27 is out... which works very well with Spacemacs. Apart from that it should all work

practicalli-johnny12:12:06

Good to know how you found the Practicalli content, hopefully it will help even more people now.

kah0ona12:12:11

i’m on spacemacs 0.200.1 @ emacs 27.1

kah0ona12:12:39

so will upgrade that soon

kah0ona12:12:45

using your guide

practicalli-johnny12:12:15

Spacemacs 0.300 has 2.5 years worth of updates and fixes. Its what I have used for the last 2.5 years 🙂

practicalli-johnny12:12:40

There are a few key binding changes, but almost all are additive

kah0ona12:12:44

yeah really need to upgrade

kah0ona12:12:47

missing out