I've created a pull request to add a few clojure-mode
refactor keybindings for namespaces. As its clojure-mode
these work even without the REPL running. The key bindings should not conflict with clj-refactor (if that projects documentation is correct).
SPC m r a n
insert a namespace form at the beginning of the buffer
SPC m r a N
insert a namespace form at point
SPC m r s u
sort included namespace names within the ns
form (e.g. sort required namespaces by alphabetical name)
https://github.com/syl20bnr/spacemacs/pull/13755
wouldn't it be nicer if the linter did the last item for you?
linters are intended to show issues rather than change code and I would prefer it remained that way 🙂 Refactor tools are intended to change code. I also prefer to sort namespaces by purpose, especially as the number of referred namespaces increases. It makes refactoring a (legacy - i..e anything I haven't worked on for a few weeks) project so much easier.
> linters are intended to show issues rather than change code and I would prefer it remained that way
having the dubious pleasure of working with golang
lately, the only saving grace is the fact that the linter fixes lots of formatting and small issues for you automatically on file save.
That sounds really annoying to me I am afriad
I pushed some docs on the new keybindings to the Practicalli Spacemacs book, although you will have to grab the PR or wait for it to be merged to use the key bindings. The commands already exist though. https://practicalli.github.io/spacemacs/refactor/namespace-definitions.html
i just found myself want to access the kill-ring from within the minibuffer (for replace-string
), and while i could use M-x helm-show-kill-ring
i wasn't able to use the spacemacs menu M-SPC r y
(i'm using holy-mode with a M-SPC
leader key) - anyone have any idea why this should be ?
@mccraigmccraig Running SPC SPC replace-string
followed by M-m r y
I do get helm showing the kill ring. I have the default M-m
as the leader key that works in any state, holy or evil. Using Spacemacs develop and packages updated in the last couple of days.
C-y
pulls the latest value from the kill ring and puts it in the mini-buffer or in a helm prompt.
There have been a few changes in helm over the last month. If you updated Emacs packages then that may have changed something (just a guess).
what's the symbol for the any-state leader-key @jr0cket? is it just dotspacemacs-emacs-leader-key
?
@mccraigmccraig I believe so. Emacs (holy) keys are always available unless over-ridden by Evil states
My Spacemacs config is in this repo if you want to compare anything https://github.com/practicalli/spacemacs.d
thanks @jr0cket
Does anyone use intelliji and spacemacs? I'm going to setup intelliji this weekend so i can see how the java interopt changes my workflow.
Yes, i suppose i mean simultaneously. I'm going to try the work flow your suggesting. Though now that i'm getting more comfterable with whats possible, it seems i'll need to use google and javadocs enough that intelliji isn't as clear a win as I thought for interopt.