Fork me on GitHub
#spacemacs
<
2019-09-09
>
Aleix18:09:44

is there a way that, on save, cider re-evaluate the whole file?

flefik19:09:26

you can use an after save hook?

flefik19:09:35

(add-hook 'after-save-hook 'foo)

flefik19:09:12

and defun foo to call cider-eval-buffer (conditional on file type etc.)

Aleix19:09:14

Gonna try, super new to this world, thanks for the tips ^^

flefik19:09:20

i normally don’t save the file and just evaluate the buffer

flefik19:09:08

then it just asks you y/n if you want to save it before evaluating

Aleix19:09:11

Which shortcut is to evaluate the whole buffer instead of placing the cursor at the end? Can't find. Using ctrl+x ctrl+e currantly

flefik19:09:30

if you press M-x

flefik19:09:42

you can start typing a command

flefik19:09:50

you want cider-eval-buffer

flefik19:09:58

you’ll notice how the shortcut is listed there too

flefik19:09:32

(I use the vim bindings so it’ll be something different in holy mode)

flefik19:09:06

M-x means meta-x it’s usually Alt-x

flefik19:09:32

(Ctrl-x is abbreviated C-x etc.)

Aleix19:09:36

Thanks @UAEFFG05B ^^ much appreciated

flefik19:09:14

have you seen practicallis spacemacs guide?

Aleix19:09:20

started with it, but lost the other tutorials