Fork me on GitHub

i'm pretty new to spacemacs. i see it supports clojure symbol replacement using clojure-enable-fancify-symbols which works fine, but is there a way for me to add more symbols to replace such as defn?


if you look at the source for clojure/fancify-symbols (which is in funcs.el in the clojure layer)


you'll see that it is just adding things to font-lock-add-keywords MODE


so presumably you can just call that function directly from your code to add additional symbols


hey that's great, thanks chris!


apologies for the newbie questions, but is the standard way of wrapping with parens / brackets, expanding selections, slurping etc really to drop out of insert mode and use the SPC v and SPC k menus? is there a way to stay in insert mode? for instance in cursive i can just ctrl + shift + ( and my current form gets wrapped.


you can just use whatever you have set as dotspacemacs-emacs-leader-key k w


I just use evil-surround, personally


thanks. i'll look into it.


erm, last question, but how do i paste (yank?) from outside emacs into the buffer?


what part isn't working? That's pretty much always 'just worked' for me


i'm sure it's just me missing some fundamentals (and learning both vim modes and emacs). C + y was only pasting the first letter of what i had on the clipboard but hitting it again seemed to work. thanks!


hmm, that's weird. are you using hybrid editing mode?


fresh out of the box in evil mode, as far as i can tell


you're on spacemacs right? near the top of the dotspacemacs-init function there's a var called dotspacemacs-editing-style


mine is set to vim


and when I'm in insert most emacs style keybindings are not bound (so C-y doesn't yank into the buffer, for example)


if you set it to hybrid you can get most emacs things bound when in insert


ymmv though, the only time I used it (which was awhile ago) it was pretty buggy


yup, looks like i'm using vim mode as well. maybe i'll start over with a new spacemacs instance just for good luck.


@joshkh - Regarding wrapping with parens etc, you can do that in insert mode. Try M-m k w in insert mode, for example. However, those SPC k commands take you out of insert mode afterward and into the transient state, so you can't really stay in insert mode with those anyway. (Other commands might let you.) I think if that's important to you, other paredit-style editing packages for emacs might serve you better.


Also, in macOS, I have success pasting in insert mode with command-v like with other apps.


thanks for the info. i'll first wrap my head around the default setup before getting crazy with customization. i'm sure the community has put together a great starting point and that i'm just feeling the learning curve of a new editor. on a side note, chris, editing fancify-symbols worked well for me.

Drew Verlee15:02:31

if i want to run multiple Clojure projects whats the way to do that in spacemacs? In intelliji is multi projects. in emacs/spacemacs is it multiple buffers?


@drewverlee projectile works pretty well - although i'm not sure which spacemacs layer is bringing it in to my config

Drew Verlee17:02:53

yea. it seems its straight forward it just happend to not work with the directory i was trying to jump into.

Drew Verlee17:02:18

projectile-switch-project or something


>if i want to run multiple Clojure projects whats the way to do that in spacemacs? use layouts aka persps. SPC l


"layouts" and "eyebrowse" are two extremely handy tools, first one you'd use to keep separate context for every project, second - for multiple window configs within a single project


e.g. SPC l 1 foo then open "project Foo", SPC l 2 then open "project Bar" - you have two different contexts for two projects, you can switch between them using "layouts keys" - check SPC l ?


then within "project Foo" you may have one window config with two vertical splits for "code", and then if you want to have a different set of windows and buffers for "tests" you can create it with SPC l w