This is an automated archive made by the Lemmit Bot.
The original was posted on /r/neovim by /u/Snoo_71497 on 2025-10-27 23:53:04+00:00.
I am sure this comes up now and again, but I couldn’t contain my surprise. I have known about the :g command for a while, just never really saw a use for it. This was until I saw it being used with :norm. For the unenlightened, combining :g and :norm lets you effectively run arbitrary vim motions on all lines matching a regex. I truly have been using this pattern so often to save with refactoring names and structures. It’s search and replace on crack!
Really interested now if there are some other cool uses of :g that I have been missing out on.
You must log in or register to comment.


