reddit / emacs

Add a numerical shortcut to emacs dashboard items.

jmhimara 路 2022-03-29 17:27
I used to have this in spacemacs, but for the life of me I can't figure out how to add it to my own emacs config. Basically, I want each item in the dashboard to display an number next to it (e.g. 0-9 ) so that I can navigate to that file/project by simply typing the number.
pwab 路 2022-03-29 18:01
You are looking for winum package: https://github.com/deb0ch/emacs-winum
jmhimara 路 2022-03-29 18:10
Hmm, at first glance, it doesn't look like what I want. To explain it better, while the dashbard by default looks like this: Recent Files: (r) path/to/file-1 path/to/file-2 etc.... I want to be able to navigate to those files by pressing numbers, i.e: Recent Files: (r) (1) - path/to/file-1 (2) - path/to/file-2 (3) - etc.... where if I type `1`, emacs opens `file-1` and so on.
pwab 路 2022-03-29 18:11
Oooooohhhhh ok 馃憣馃徑 then yeah, winum doesn鈥檛 do that. gl
thetemp_ 路 2022-03-30 21:34
This would be similar to what [ace-link](https://github.com/abo-abo/ace-link) does, except that ace-link [doesn't work with dashboard](https://github.com/emacs-dashboard/emacs-dashboard/issues/346), and it uses Avy style keys for selection instead of numbers. If you're already using Avy, you could use avy-goto-line to get to the link you want. Then you'd have to press enter to follow the link. Unfortunately, that's not as elegant as having key-bindings already indicated and pressing one of them to go.
jmhimara 路 2022-03-30 21:40
It's frustrating because I had this in spacemacs, but I'm not sure how. It's not enabled by default, so i have to figure out how i enabled there, and then figure out how to port it to a vanilla config. Oh well....