Thanks for the info.
What's the proper way to exit spacemacs so that all the persepctives are saved? I have done SPC q s
, but it only restored the buffers, I have to reopen the layouts myself.
SPC q r
There is also an explicit option in .spacemacs to save layouts.
SPC l s
to explicitly save the layers. I also save to a backup file occasionally
But SPC q r
restarts, I just want to quit (when rebooting my laptop).
set the option to remember layouts in the .spacemacs file. the configuration is already there, just need to change it from nil to t
works for me. i never even though to question this behavior
Bonus question: is it possible to make spacemacs restart the repls that were open? Or just make them start on spacemacs start.
No. External processes won't be restarted.
@posobin I'm going to work on something that tries to solves a related issue of starting clojure project(s) that have multiple repls: https://github.com/practicalli/spacemacs-content/issues/228 effective repl management might be to specific to be confined to a set of generic functions. But i think it would be good to at least collect a running set of examples of how this can be done so people can get an idea of how to handle there own situttion. Im guessing an experienced emacs lisp programmer would find doing some of these things far less daunting.
thought its possible the ideal way to handle this is to have a process outside emacs manage it. as tieing multiple repls to emacs eventually means one will crash and you have to kill emacs and lose all of them.
i feel like this is probably the one aspec where intelliji has a better story.
Also, is it possible to show treemacs trees for different projects when in different perspectives?
I don't really use Treemacs but it seems to show any project tree for any project where Treemacs has been opened. See SPC h l treemacs
to see the layer documentation which lists the key bindings and commands available.
One more question: when I do yy
on a line (if (nil? target)
nothing gets copied, I think because of parenthesis that are not matched. How do I make this work so it copies something like (if (nil? target))
or without the enclosing parenthesis.
If you are using smartparens global strict mode then this helps avoid unbalanced parens. Add evil-clever-parens for structured editing support in Evil normal.
I haven't tried to copy an unbalanced expression (as I don't have them). Try V y
No, the expression is balanced, but the closing paren is on another line.
I understand that this helps, but it could just copy it without the opening parenthesis, just like dd
would delete everything except the opening parenthesis. I am looking for this behaviour. Otherwise it is very annoying since I have to do yy
- go to where I want to paste - see it didn't copy - go back - go to the point after the opening paren - press Y
- go to the place I wanted to paste in - paste.
Sorry, I dont understand
If I have two lines
(when x
y)
And do yy on the first line nothing gets yanked, I want either when x
or (when x) to be yanked
Seems a very strange situation, so probably can't suggest anything useful, sorry.
I assume you would need to write your own function for that, especially to get (when x)
from the first line without the y
Much easier to grab the whole expression and delete y
after.
Pasting unbalanced or unwrapped code is a very effective way to break code.
Have you looked at the SPC k` menu for structural editing, maybe there is something similar...
But dd
does exactly what I want except it also deletes the code in the line!
dd would remove the when x and leave (y).