Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It’s very hard to describe without a visual but the gist of it is that the combination of the following 3 packages make it possible dynamically create queries, refine the results to precisely what you want, and then either perform some action on them or just plop them into a buffer for later use. There’s some notion of a type of the result, which means that the actions and results can be richer than just plaintext. Ie: you can imagine a query over a list of commits, where it displays while you’re searching as only the commit shortrev and subject, but where you can viably define a filter on the commit date or commit author. You can then export that list to a temporary buffer, and pressing enter on any given commit will show you the full diff and the full commit message. Orderless means you’re not crafting regexes directly, but just some combination of words in any order or casing.

Another example: grep in the current project for any function matching foo bar baz in any order followed by an open paren, restrict the search to only header files, export to a buffer, run search in replace in that temporary buffer, review the changes, then commit the modification to disk in every matched file with a single keystroke.

https://github.com/minad/consult/

https://github.com/oantolin/orderless/

https://github.com/oantolin/embark/



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

Search: