Fork me on GitHub
#emacs
<
2018-11-21
>
niels09:11:19

Is there an emacs package that interactively suggests more efficient/idiomatic ways of navigating? e.g. you hit M-C-b three times to get to the beginning of the line, and something shows up saying "Save two keystrokes with (back-to-indentation) M-m"

Felipe Oliveira02:11:17

Hmm, like an automated Emacs Golf training 🙂

Felipe Oliveira02:11:23

I personally do not know if that makes much sense. Emacs can't compete with Vim or Kakoune or others when it comes to that. But, if your objective is to reduce the amount of keystrokes without changing to Evil, you can try god-mode (https://melpa.org/#/god-mode) if you haven't. I really like Emacs defaults honestly, abusing moving by sexps and lists when editing code and by paragraphs and sentences when editing text. Making seldom use of avy (https://melpa.org/#/god-mode) to jump to words or lines when things are really distant. I couldn't find it, but ever since I read Mickey Petersen (of https://masteringemacs.org/ fame) mention that he used and abused isearch (I believe it was him at least :thinking_face:), I realized it is extremely powerful and have used and abused to move around as well. I even use it to select regions by setting a mark and doing a search. It's awesome and very fast. Add to that the stuff bound to M-s, imenu and helm-occur and I don't miss a thing when it comes to moving with clarity and good speed, even if its not exactly saving me keystrokes. Possibly relevant: https://masteringemacs.org/article/discoverel-discover-emacs-context-menus and https://masteringemacs.org/article/searching-buffers-occur-mode

Felipe Oliveira03:11:57

I realize this wasn't an answer to your question (the answer is probably that such package doesn't exist, but the things closer to aiding you in discoverability are probably good old tutorials, guides and tricks), but hope it may help somehow.

Felipe Oliveira03:11:45

One last tip: I believe the most important thing when optimizing your editing flow is to do it slowly for a long time, taking the time to consider what you're actually trying to achieve. Emacs has a lot of stuff going on as you know, and it takes time to actually value and integrate its working logic with ours. By the time you are confident enough to go fast, you will be moving in a very efficient way and using the right tools for each operation.

Felipe Oliveira03:11:54

And I personally used it for years before I consciously decreased my speed in order to reflect on what I was trying to achieve, so even if you have a lot of time of Emacs, you may not have given that possibility a serious try.

👍 4
niels14:11:28

This is good advice. It's hard to slow down when you're on the clock. I find that when I sit down in my own time, and use it with no goals in mind I end up learning the most.

hlolli12:11:22

don't think so, but emacs gives you a suggestion when you run a function with M-x, when that function is bound to keys, it will tell you that you can run it with a keysequence. You can get a package that autocompletes keysequences, you write C-c and you get a list of keysequences. But I recommend asking here for finding more efficient ways to do things.

niels13:11:04

I think you're talking about which-key, right? I use it, and like it. But what I was hoping for is something like those online tutorial things like "emacs foo" where you try to get somewhere in as little keystrokes as possible. Anyway, thanks for thinking along.

slipset20:11:00

C-h t is your friend.