Fork me on GitHub
Gleb Posobin02:06:11

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

Gleb Posobin13:06:32

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

👍 3
Gleb Posobin02:06:51

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.

Gleb Posobin02:06:03

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.

Gleb Posobin04:06:13

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

Gleb Posobin13:06:14

No, the expression is balanced, but the closing paren is on another line.

Gleb Posobin13:06:29

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

Gleb Posobin14:06:02

If I have two lines

(when x
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...

Gleb Posobin15:06:14

But dd does exactly what I want except it also deletes the code in the line!

Gleb Posobin15:06:46

dd would remove the when x and leave (y).