Fork me on GitHub
#spacemacs
<
2017-08-07
>
mitchelkuijpers10:08:45

@claudiu That only happins in cljc files right? You can switch from clojure-mode to clojurescript-mode and then it will show the active code higlighted

claudiu11:08:50

@mitchelkuijpers Think so (most of my code is in cljc), computer restarted and I can't reproduce it anymore. But it's was different from when I switch modes. It lost syntax colors and just a bold neon green. Strange one 🙂

bja15:08:50

you can use eval as a verb

bja15:08:54

it's pretty trivial

bja15:08:33

(evil-define-operator emidln//generic-evil-eval-operator (beg end) (emidln//generic-eval-region beg end))

bja15:08:52

replace emidln//generic-eval-region with cider-eval-region or whatever you want

bja15:08:39

then set that to some keybinding (evil-leader/set-key "meo" 'emidln//generic-evil-eval-operator)

bja15:08:55

then you just compose your selections and , m e o

bja15:08:09

(maybe you use something quicker to type than , m e o but I rebound all of the common stuff in terms of my generic eval already so that I don't use it too often)

eggsyntax15:08:21

@bja Cool, thanks! I've never looked into defining my own operators or text objects, but that looks fairly reasonable. Two questions: - What's emidln, and why the double slash //? - What do you mean in that sentence by "compose your selections"?

eggsyntax15:08:35

(I'm guessing emidln is one of your own namespaces)

bja15:08:47

emidln is my github handle; it's just a private namespace

bja15:08:12

since all names are global in elisp

bja15:08:33

if you look into how spacemacs is implemented, you see a ton of spacemacs//foo

bja15:08:41

Say your mark is at ^ in the following:

(comment

^
(require 'clojure.pprint)

(clojure.pprint/pprint {:foo :bar, :spam :eggs})

)
SPC m e o 2 } would eval the next two 'graphs

bja15:08:00

so you have SPC m e o and then an arbitrary motion

eggsyntax15:08:50

OK, great, that makes sense. The way you phrased it made me think possibly you were using it differently, but what you just said matches my mental model.

eggsyntax15:08:34

Much appreciated -- I'll implement that later today 🙂

bja15:08:04

I only used SPC m e o to match the usual spacemacs language modes, if it's something you use a ton, I'd bind it to something less verbose

eggsyntax15:08:40

For sure. It'd be nice to bind it to a single keystroke, to make it parallel with eg d or y.

bja15:08:52

but I bind C-c C-c to eval the current graph or visually selected region and with C-c C-b to eval the buffer that covers like 98% of my eval needs

eggsyntax15:08:54

Not that I have many single keystrokes available for use 😜

bja15:08:29

holding ctrl and double tapping c is convenient enough for me

bja15:08:57

the visually selected region part is what I use more than the eval operator though

bja15:08:12

since I tend to just enter visual mode, do a motion, verify it's what I want to eval, and then eval it

dominicm15:08:22

@bja kakoune might be of interest to you

bja15:08:57

@dominicm that seems almost like Plan9 for Vim

bja15:08:44

in that it's clearly Vim derivative (maybe not the codebase), but is seeking improvements and internal consistency over strict adherence to its ancestor

bja15:08:22

it's too bad I found spacemacs before that

mike_ananev19:08:37

hi there! I use "default" scheme for emacs in spacemacs. everything is fine except colors in powerline. how to change colors in dark areas? (see screenshot)