Emacs-wgrep
lunarymacs
Emacs-wgrep | lunarymacs | |
---|---|---|
6 | 5 | |
601 | 233 | |
- | - | |
6.2 | 8.1 | |
4 months ago | 11 days ago | |
Emacs Lisp | Emacs Lisp | |
GNU General Public License v3.0 only | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Emacs-wgrep
-
bulk Multiline find-and-replace?
But you probably wish something like wgrep (writable-grep), which is similar to wdired if you are familiar with that one. It will basically let you grep your files and display results in a buffer, then edit that buffer, and finally save changes to all referenced files.
-
The benefits of everything (in Emacs) being a buffer
Oh yeah, it gets even more interesting in large refactors, say an involved rename that requires you check the context before you do so (like not just global search and replace). I do a search, this opens a buffer with all results, with file name, position, all that, and Emacs can allow you to "peek" into the file without even leaving the search buffer focus (i.e use a split screen). Then, use https://github.com/mhayashi1120/Emacs-wgrep to do the magic of in-place editing.
-
Question about editing Consult/Embark ripgrep results;
If you use the grepping commands from the Consult package, consult-grep, consult-git-grep or consult-ripgrep, then you’ll probably want to install and load the embark-consult package, which adds support for exporting a list of grep results to an honest grep-mode buffer, on which you can even use wgrep if you wish.
-
Fuzzy Finding with Emacs Instead of Fzf
The `Emacs-wgrep` [1] package is what allows you to edit a standard Emacs grep buffer and have the specified changes applied to all the project's files. I just recently started using it, and it's extremely handy!
[1]: https://github.com/mhayashi1120/Emacs-wgrep
-
If you have never used wgrep with rg.el to rename a function in several files, try it | that will blow your mind
In this post we see how to rename interactively a function that appears in several files using rg.el and wgrep!
-
How to edit lines in the xref buffer?
Have you take a look at wgrep? https://github.com/mhayashi1120/Emacs-wgrep
lunarymacs
- lunarymacs: casouri's Emacs configuration
-
The benefits of everything (in Emacs) being a buffer
He's also behind expand-region! (Although, I've started experimenting with the much-smaller treesitter-based https://github.com/casouri/lunarymacs/blob/master/site-lisp/...)
I'm pretty sure when he wrote all of that stuff that he'd only been using Emacs for around a year. The benefit of someone that talented, or groks Emacs immediately, and is familiar enough with the outside-ecosystem to know what he wants to borrow, I suppose.
- expreg.el --- Simple expand region
-
Tree-sitter starter guide
I'm also a diehard expand-region user! I believe a less precise but super simple command is better than a precise but complicated one. IMO expand-region > text objects, forward/backward-sexp/word > avy / other fancy navigation tool. But I digress. For tree-sitter aware expand-region, this is what I'm using: https://github.com/casouri/lunarymacs/blob/master/site-lisp/expreg.el
-
[ANN] info-variable-pitch: View Info with proportional fonts while keeping (most of) what needs to be monospace in mono
You can find my attempt here, I used some ad-hoc parsing instead of regexp, and I didn't use font-lock. https://github.com/casouri/lunarymacs/blob/master/site-lisp/info-pretty.el
What are some alternatives?
deadgrep - fast, friendly searching with ripgrep and Emacs
puni - Structured editing (soft deletion, expression navigating & manipulating) that supports many major modes out of the box.
embark - Emacs Mini-Buffer Actions Rooted in Keymaps
elisp - A relic of the past.
iedit - Modify multiple occurrences simultaneously
exwm - Emacs X Window Manager
melpa - Recipes and build machinery for the biggest Emacs package repo
straight.el - 🍀 Next-generation, purely functional package manager for the Emacs hacker.
doomemacs - An Emacs framework for the stubborn martian hacker
evil-textobj-tree-sitter - Tree-sitter powered textobjects for evil mode in Emacs
fussy - Emacs completion-style leveraging flx
haskell-ts-mode - Emacs major mode for Haskell tree-sitter support.