Fork me on GitHub
#emacs
<
2024-06-14
>
Alexwanng06:06:16

Displaying the shortcut keys and their corresponding function names below Emacs is very user-friendly. How can I enable it?

karlis07:06:59

Check out suggest-key-bindings variable, the package in screenshot is https://github.com/tarsius/keycast

๐Ÿ‘ 1
Alexwanng07:06:12

Cool! It works!

๐Ÿ‘ 1
practicalli-johnny11:06:27

If more of a history is required, then https://github.com/lewang/command-log-mode is also very useful. It shows commands in a separate buffer. I found this especially useful when learning or accidentally hitting incorrect key combinations or doing a demo. I've used keycast in my screencasts too, its very nice. It can also show the keys in the tab page and window heading.

๐Ÿ‘€ 1
โœ… 1
aisamu13:06:23

re: command-log-mode, there's the built-in view-lossage

til 1
jf03:06:33

just out of curiosity, does anybody know what the theme is in the OP screenshot?

Alexwanng12:06:28

(setq package-list
    '(paredit ;; or personal preference. parinfer is also good
      cider
      clojure-mode
      nord-theme
      async
      ob-async
      ob-clojurescript
      org-babel-eval-in-repl
      eval-in-repl))
`nord-theme
from https://gist.github.com/adam-james-v/7a61612ce0649afc78513f54b337d8c9 @U1UQEM078

๐Ÿ™ 1
Alexwanng13:06:24

Does the M-x command support general queries instead of exact queries? For example, I canโ€™t remember cider-insert-last-sexp-in-repl, can I just input cider insert repl to match it?

oyakushev13:06:01

Helm, for example, has helm-M-x which supports that

djm13:06:45

There's the built-in fido-mode and fido-vertical-mode : http://xahlee.info/emacs/emacs/emacs_fido_mode.html Or vertico is also very popular (https://github.com/minad/vertico)

๐Ÿ‘ 1
Roma13:06:35

You need to customize completion-styles variable, it's possible to make it work with almost any completion package, including built-in.

Roma13:06:16

if you want to use spaces to separate matches, you might consider https://github.com/oantolin/orderless

โœ… 1
Alexwanng15:06:39

> Thereโ€™s the built-in fido-mode and fido-vertical-mode : Yeah, it worked! There is a restriction, the order needs to be correct. > if you want to use spaces to separate matches, you might consider https://github.com/oantolin/orderless It seems to meet the requirements, but I was not successful. I am not familiar with Emacs. ๐Ÿ˜ž I will take another look when I have the chance.

djm15:06:40

Yes, orderless will help with not needing the order to be correct

vemv15:06:45

I use https://github.com/nonsequitur/smex - probably considered old-school by now. Does the right thing, 'set it and forget it' ๐Ÿ™‚

djm15:06:08

Probably the easiest way to get orderless working would be to turn off fido, and use it with vertico, copying the vertico and orderless config here: https://github.com/minad/vertico?tab=readme-ov-file#configuration (not that the orderless bit is just after the rest)

1
Alexwanng17:06:28

> Probably the easiest way to get orderless working would be to turn off fido, and use it with vertico, copying the vertico and orderless config here: https://github.com/minad/vertico?tab=readme-ov-file#configuration (not that the orderless bit is just after the rest) wow, this saved me! ๐Ÿ™‚ I failed with orderless + icomplete-vertical before ๐Ÿ˜ž