deadgrep-kill-all-buffers always useful to clean up the mess at the end.smart picking up the dir to search GIVEN that you have VCS inside that dir (git repo etc).One can choose how many lines to show before and after each hit. the context to show around the search hits is very handy.convenient simple user interface (which I hope would add more features especially the way one would choose a dir to search in the near future). much faster than helm-ag using ag Silver Searcher.I just tried deadgrep now and my first impression as compared to helm-ag is this: Rdiaz02: (defun deadgrep-org-roam (search-term dir) (list search-term your-org-roam-directory) (search-term (deadgrep-read-search-term))) GitHub, I used this function to search in my org-roam-directory: (defun deadgrep-org-roam (search-term dir).In case it helps, based on Allow searching in other directories But, of course, this is just my experience and definitely other people here are using it joyfully. So for my use cases, it is not a good fit. In addition, I was not able to figure out how to, by default, use always the interactive search. And for matching multiple terms in the same line, I find consult-ripgrep, as explained above, a lot simpler (again, disclaimer: for me and my limited knowledge of ripgrep). But, for me, searching for files that contain all of a set of words that can be in different lines is much more cumbersome than with xeft or velocity. It is very fast for sure, including the incremental searches. (but I think issues are still here: GitHub - casouri/xeft: Fast, interactive Emacs note searching).ĮDIT: I gave deadgrep a try. It uses Xapian (install was a piece of cake in Linux) and it is really fast and intuitive to use (e.g., the query syntax for searches: Xeft: Queries). In the last hour, however, I’ve been playing with xeft (which I saw mentioned somewhere else). Based on the searching tools behind those too, I’d assume they should be faster, but this is just a wild guess. I had not thought about it, and I’ll give it a try. Thanks a lot you for your suggestion of using projectile-kill-buffer. I wonder if you have experienced firsthand how does emacs-velocity solution compare to others like deadgrep or microfts which are also positively mentioned in this thread? Second, thank you for your input regarding emacs-velocity which supports helm, I use helm-ag personally, but to be honest, I didnt test it’s scalability. This is my best way so far to kill project-specific buffers, very handy. This way you can selectively kill all opened buffers which are org-roam related in one keystroke. projectile file (empty) inside org-roam dir (or any dir which contains your target or project org files). I suggest using projectile-kill-buffers bound to C c p k assuming that you are using projectile package and there is. The preview is not really preview as for the consult-ripgrep solution above rather, it opens the files (so you can end up with a long list of open buffers).įirst, I just want to point out a workaround if you end up opening a large number of buffers as a result of a full-text search and you want to kill them all quickly in one go.I typically rgrep when looking for multiple instances of a word inside the directory (or every instance) as it gives a retainable buffer easily allowing you to search multiple times, and counsel-rg when I need a one off or when I want to create the regex as I go and see the results slowly show up. I am pretty sure other completion frameworks have this as well. You then choose what you want and can even narrow it down as it interactively searches as you type. The other tool I use is counsel-rg (as I am an Ivy user), which uses ripgrep as its backend (an excellent rust rewrite of grep) and stores the output in the minibuffer. The great thing is that since this creates a new buffer, you can keep the search results for later even. You can them open each instance and see everything. Searches the roam directory recursively and stores every instance of the requested regex inside a buffer it creates for output. In emacs, I use two commands for this, both based on grep. You can recursively search for any regex inside all the directory’s files using the grep tool. This is one of the areas where being a plain text format truly shines.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |