spacemacs

Spacemacs docs: http://develop.spacemacs.org/doc/DOCUMENTATION.html http://develop.spacemacs.org/layers/+lang/clojure/README.html https://practicalli.github.io/spacemacs/
2020-06-11T00:45:56.406100Z

Thanks for the info.

Gleb Posobin 2020-06-11T02:18:11.407500Z

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.

practicalli-john 2020-06-11T10:00:56.410900Z

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 Posobin 2020-06-11T13:22:32.411900Z

But SPC q r restarts, I just want to quit (when rebooting my laptop).

practicalli-john 2020-06-11T14:04:16.412600Z

set the option to remember layouts in the .spacemacs file. the configuration is already there, just need to change it from nil to t

👍 2
2020-06-13T12:37:50.415300Z

works for me. i never even though to question this behavior

Gleb Posobin 2020-06-11T02:18:51.408200Z

Bonus question: is it possible to make spacemacs restart the repls that were open? Or just make them start on spacemacs start.

practicalli-john 2020-06-11T10:01:56.411100Z

No. External processes won't be restarted.

2020-06-13T12:44:22.415500Z

@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.

👍 1
2020-06-13T12:46:46.416Z

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.

2020-06-13T12:47:15.416200Z

i feel like this is probably the one aspec where intelliji has a better story.

Gleb Posobin 2020-06-11T02:28:03.409Z

Also, is it possible to show treemacs trees for different projects when in different perspectives?

practicalli-john 2020-06-11T10:04:12.411300Z

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 Posobin 2020-06-11T04:03:13.410800Z

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.

practicalli-john 2020-06-11T10:07:43.411500Z

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 Posobin 2020-06-11T13:23:14.412100Z

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

Gleb Posobin 2020-06-11T13:24:29.412300Z

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.

practicalli-john 2020-06-11T14:08:11.413Z

Sorry, I dont understand

Gleb Posobin 2020-06-11T14:13:02.413200Z

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

practicalli-john 2020-06-11T14:23:18.413500Z

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 Posobin 2020-06-11T15:12:14.413700Z

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

Gleb Posobin 2020-06-11T15:12:46.414Z

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