Fork me on GitHub
#spacemacs
<
2019-06-12
>
practicalli-johnny13:06:47

I finally got around to using marks in buffers, really useful. m a to create a mark called a, ' a to jump to that mark. Marks can be used as a verb/modifier in Evil

prnc13:06:42

pretty useful stuff, I quite often will have some form that I eval repeatedly (inside comment form) marked with m e

prnc13:06:56

also capital letters work cross buffer!

prnc14:06:20

very useful when you have some reference piece(s) of code you keep coming back

aisamu14:06:27

BTW is there a(n easy) way to invert that? Globals on lowercase, locals on Uppercase (which I rarely use)?

prnc15:06:29

maybe, but seems like it’s hard coded

(defun evil-global-marker-p (char)
  "Whether CHAR denotes a global marker."
  (or (and (>= char ?A) (<= char ?Z))
      (assq char (default-value 'evil-markers-alist))))

👌 4
didibus05:06:21

Nothing is hard coded in Emacs 😋 Just one redef away

prnc15:06:56

if that’s in fact the right place 😜

prnc15:06:51

that’s in evil-common.el BTW

practicalli-johnny15:06:19

I've created a PR for the Clojure layer to add the , e i keybinding for cider-interrupt, which kills a long running evaluation. For example you can use it to stop (range) evaluating before it eats all the stack 🙂 https://github.com/syl20bnr/spacemacs/pull/12428

8
prnc15:06:09

@jr0cket Cool! Isn’t this mapped to C-c C-c in the REPL buffer currently? I would probably say that something under , s namespace would be better for this, matter of taste ofc. It’s just where all the repl session related functionality lives curretnly--clear, connect, jack-in etc. feels like a natural home?

practicalli-johnny16:06:31

@prnc no keybinding shows up in the Clojure major mode menu, so this is why I proposed the add. For those that do not use the REPL buffer directly, the C-c C-c keybinding is not relevant. I added to the evaluation section because it is in regard of evaluating a specific (the current) expression. The command instructs the repl to stop evaluation, the other bindings under evaluation instruct the REPL to start evaluation. I don't want to stop or reset at the REPL level. The functions under the cider repl seem to be a bit of a mixed purpose and level of abstraction. Additionally there doesn't seem to be room for a sensible keybinding under the cider repl section, , s, at least I could not think of one. Any ideas?

prnc17:06:59

>I added to the evaluation section because it is in regard of evaluating a specific (the current) expression. I think you’re right. That makes sense. Re: the default bindings, not sure where that comes from but

C-c C-b runs the command cider-interrupt (found in cider-mode-map), which is an
interactive compiled Lisp function in `cider-client.el'.
 
` is what I have for clojure-mode, weird...

prnc17:06:01

…so that’s from my function help for cider-interrupt

practicalli-johnny01:06:59

I'm not sure why the binding doesnt show in the documentation for the function. Its always good to understand how people are using things in Spacemacs, especially the Clojure layer. Thanks for the feedback.

aisamu05:06:55

Another user of C-c C-c chiming in. Usually preceded by "Oh, crap!" and , s s, so I'd definitely appreciate more a direct binding! describe-function for cider-interrupt here says:

It is bound to C-c C-c, C-c C-b, <menu-bar> <REPL> <Interrupt evaluation>,
<menu-bar> <REPL> <Test> <Interrupt running tests>.

didibus05:06:09

I just wish the Repl and major mode had the same binding for all.

practicalli-johnny22:06:14

@ag SPC S s for flyspell-correct-at-point has now been cherry picked into develop from PR https://github.com/syl20bnr/spacemacs/pull/12430

❤️ 16
ag23:06:50

awww… I completely forgot about it. I wish we also added something for flyspell-auto-correct-word. Turns out that thing is pretty cool

ag23:06:43

Although, you know what? Maybe that thing deserves it’s own transient. So the way how it works e.g. in Org-mode. I think it’s bound to M-C-i by default. You press the button, it attempts to auto-correct it and shows you list of alternatives - you keep pressing the key, it keeps cycling through them.

ag23:06:28

cool, right?

ag23:06:25

it’s basically “I feel lucky” version of flyspell-correct-at-point

ag23:06:57

I think it would be nice if it worked in Spacemacs like SPC x i i

ag23:06:05

string-inflections-transient

ag00:06:35

after playing a bit with flyspell-auto-correct-word I came to a conclusion: it is pretty “dumb” and most of the time doesn’t even offer you a correction

ag00:06:56

compared to it flyspell-correct-at-point works better

practicalli-johnny01:06:18

There is a lot of features in the spell-checking I haven't really tried out. I only fix spellings as I go along. I'll have to explore it a bit more some day. Thanks for the feedback, very interesting.

ag02:06:30

yeah, I discovered flyspell-auto-correct-word word myself only yesterday and I liked it. Definitely has value, but I already build muscle memory for flyspell-correct-at-point which I bound to SPC xx. So whenever I make a typo I would do SPC xx RET, even without looking. Most of the time it turns out to be the correct suggestion. There’s also flyspell-correct-previous, which I guess also can be handy, since most of the time you see the typo after you type a word and cursor is moved on.

ag02:06:30

sadly my proposal for SPC xx binding was rejected, but I’m a very sloppy typist. And as you know I type everything in Emacs. This binding has immense value for me. I also want to add flyspell-correct-previous to my workflow, maybe binding it to SPC x b and see if that sticks.

practicalli-johnny11:06:07

I haven't looked at the text menu much, SPC x, so nice things in there. I agree that SPC x x or SPC x s would be a nice keybinding and maybe I would be more inclined to use the +text menu 🙂

practicalli-johnny11:06:22

PR's seem more likely to be merged if they have others comment on them, at least that's what it seems. So feel free to ping me any PR's you do (or post them in the #spacemac channel and I'll comment on them.

ag17:06:48

thesaurus, dictionaries, spell-checking are paramount features for me. English is hard and I’m not a native speaker, it’s five times harder for me.

ag18:06:22

And for plain text editing there’s no other tool that could work for me better than Emacs. There’s one thing is still missing from my workflow which I would love to have - Grammarly like syntax checker via flycheck. Grammarly sadly does not have API that can be used without using their app. I’ve been looking for alternatives. One of them is Grammarbot (for which I intend to build an emacs-package, but I can’t find time to do it) There are also projects like flycheck-vale that I may try when I have a chance.