floss.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
For people who care about, support, and build Free, Libre, and Open Source Software (FLOSS).

Administered by:

Server stats:

685
active users

Neo(vim's) recording feature is so cool!

@CleoMenezesJr to anyone telling you they can do the same with multicursors, tell them you can apply this kind of change in 100 files with no effort.. Good luck doing that with multicursors 😅

bew :nixos::neovim:

@normalmode How did you manage to make conditionals with macros?

I have this usecase sometimes to do a part of a macro only if some char is there, but IIRC (neo)vim cancels the macro execution when `f,` is not working for example

@bew By figuring out ways to get the cursor to move to the position of the code for each of the branches. It’s kind of hard to describe without going into gory detail, but if you’re able to read her Twitter thread, Pelafina Lievre breaks down the entire thing really clearly.

If you liked it, you should check out my other macro constructions! normalmo.de/categories/fun-wit

normalmo.deFun with MacrosVim is the best editor.

@bew You basically can’t. The techniques I came up with to workaround this aren’t really practical to use in general day-to-day editing, I’m afraid.

@bew Okay, I think I figured out how to handle `f,` but… you’re not going to like it…

If you’d like to give me a bit more context I can show you exactly how to do it: otherwise I’ll come up with a contrived example.

This is for a blog post, so let me know if you’re happy to be credited there and if I can use your example.

@normalmode Honestly it's been a while since I needed this kind of thing 😬
Go with a contrived example, or share what you're thinking maybe ¯\_(ツ)_/¯

@normalmode no worries, that's definitely a crazy hack ^^
Thanks for the blog post explaining it that well!