Hacker News new | past | comments | ask | show | jobs | submit login

I've been using selectrum lately, it works ok, no bells and whistles... The readme [1] has a [probably very biased] comparison of alternatives, including helm.

1: https://github.com/raxod502/selectrum#why-use-selectrum




I recently switched from ivy to selectrum as well. I miss some stuff like ivy-rich, but I found integration with prescient.el[1] more important than an eye candy (where ivy-prescient breaks every few version). I still haven't got a chance to rewrite ivy-ag with selectrum^note1, but it has been working great so far.

My only issue with selectrum was, back when I'm using ivy, I rebind forward direction keys (<right>/C-l/C-f) to `ivy-partial-or-done` which either complete the input with the selection or visit a file depending on the context. Selectrum doesn't have equivalent implementation, but it's easy enough to implement. Reposting in here in case anybody needs it:

    (defun gemacs--selectrum-insert-or-submit-current-candidate ()
     "Insert current candidate or forward to `selectrum-select-current-candidate'
    if input text hasn't changed since last completion."
     (interactive)
     (let ((prev-input (selectrum-get-current-input)))
       (when (> (length (selectrum-get-current-candidates)) 0)
         (selectrum-insert-current-candidate))
       (when (string= prev-input (selectrum-get-current-input))
         (selectrum-select-current-candidate))))
[1]: https://github.com/raxod502/prescient.el

^note1: I don't use rg due to dependency on PCRE2 which doesn't play nice on my OpenBSD machine.


> ^note1: I don't use rg due to dependency on PCRE2 which doesn't play nice on my OpenBSD machine.

FWIW, PCRE2 seems to be an optional dependency, and disabled by default (unless you build it with `--feature pcre2`).


The last time I tried rg with pcre2 disabled (OpenBSD 6.4?), it SEGFAULT even with wxallowed :(


Looks like either things have changed, or this only happens under some specific circumstances.

I just tried installing it into a clean OpenBSD 6.7 VM, and it ran fine out of the box:

    # pkg_add rust
    # cargo install ripgrep
    # echo hi > asdf
    # .cargo/bin/rg hi
    asdf
    1:hi


Oh, that is nice. Thank you for testing!


Thanks for this link.

For some reason, neither helm, ivy or selectrum allows to open a candidate buffer / file in either the current buffer, a vertical or horizontal split window, like what I have grown an addiction for with fzf.vim.

As I have also grown an addiction to org mode, emacs ergonomics always feel weird to me, even with evil mode.

Selectrum seems to explicitly exclude "alternate actions" :(


Org-mode is another package that is due to "non-professional" developers. Carsten Dominik, the original creator of org-mode, is a professor of astronomy. [1] A lot of people who've contributed to org-mode are academics in fields other than computer science. Not as unrelated as mountain guides, but certainly not professional developers.

[1] https://staff.fnwi.uva.nl/c.dominik/


> For some reason, neither helm, ivy or selectrum allows to open a candidate buffer / file in either the current buffer, a vertical or horizontal split window, like what I have grown an addiction for with fzf.vim.

I use ivy and counsel, and both counsel-find-file and ivy-switch-buffer offer the alternate action "other window" under M-o j. I'm not sure if that covers your entire use-case, but it works fine for me.


Thanks, I have found this "menu", but it felt awkward and limited to either horizontal or vertical.

I have come to split first and search second.

It’s all about personal preferences.


Being Emacs, it's just a matter of customization. In your example, it would probably be enough to apply advice to one of the Ivy functions to split the window appropriately when a candidate is selected. A few lines of code.


> being emacs ... customization ... a few lines of code

I see where you are heading and I am not following you in this rabbit hole ;)

I came to use emacs for org mode, when what I really wanted was to use org mode in vim. We can’t have All the nice things, so it’s okay, I’ll live with that. I actually found out I could use emacs as a "org mode beautifier" in neoformat.vim; it is slow, but it can tangle the org file and output back to vim. Good enough.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: