What's that Vim trick that blew your mind the first time you learned about it? A feature that has a big (or small) impact on your workflow, or just a command you use a lot. Anything goes! 🤯

I'll start with my go-to trick: I usually only notice a match should be replaced after searching for it with `/` (`/foo`). After learning that substitutions with empty search patterns (`%:s//bar/`) replace the previously found matches, I've never had to re-type a pattern again.

@solnic You mean setting macros with `q<letter><commands>q`, right? Not much experience with macros, because they always take a lot of time to get right for me. 😅

They’ve been on top of my list to properly figure out for years, though.

@jkreeftmeijer I typically use `q a` then the sequence of commands, then replaying it via `@a`


@solnic `qq[commands]q` here, because somebody once told me that‘s quickest. Using the `q` registry is probably adding the the confusion, though.

Something I learned the other day (dev.to/phallstrom/comment/7kil) is that you can print and yank macros from and to their registries by using `"ap` and `"ay` (for the `a` registry) so you can see commands printed out. I’m hoping that will help me get a feel for them a bit more.

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!