@TechJolt3d

Step 1: Find
Step 2: ":s"
Step 3: ???
Step 4: Replace

@MarcCastellsBallesta

I need 20 minutes to understand every single step he made in this short.

@YourConsole

Fighting one eyed Kirby

@farisfaikar_r

This is also possible using vscode
1. ctrl+alt+down at start of line to duplicate carets
2. ctrl+right x2 (move caret to word)
3. ctrl+shift+right (select whole word)
4. ctrl+c (copy word)
5. home, shift+end, delete (delete everything)
3. Write the test { ... code
4. paste accordingly
4. ???
5. Profit

@ReptilianLaserbeam

regular expressions are like magic, it's amazing how much time you can save once you understand them

@frittex

i like your funny words wizard

@kingradical-x

This needs to be a whole series

@pavloburyanov5842

Vim makes me love regexes. I have 3 years commercial experience but just recently I realised how awesome named groups are

@TreborKoor

I have no idea what I just watched, but I fervently believe it must be correct; it includes Kirby

@sierra.mike.atomic8177

Gotta love regex.

@Feynt

I love doing this for onlookers. I get so many "what did you just do?!" reactions

@supdawg7811

I've fought a one-eyed Kirby before. I learned a lot about skill issues us Quiche Eaters never knew we had.

@priyanshukatuwal

It took me hours to learn this when I watched it first, when I look back at this now, seems so easy.

@mangierockz7460

Cool. I read the doc on substitution in neovim after watching this. Realised just how simple it is. Thanks. I learned quite a lot today. I'll try to implement this in my work flow. Seems really useful.

@askholia

I just don't think we should trust someone with that mustache.

@raffimolero64

if you like multicursor, here's how i personally do it in helix. it's not necessarily better or worse, just sharing:

C a bunch of times to select the first char of each line. now all further operations happen for all lines at once, so you can work like it's just one line.
wdwd to delete pub const.
e to skip the var name.
t<ret>d to select until before newline, and delete.
use insert mode to type everything around the var names.

option 2:
after C, instead wwwd to delete just the var name.
then X i believe selects one line. if not then you'll have to do ght<ret> to select from line start until newline.
A-C puts you in replace mode without yanking.
in insert, type out the first part, then C-r" to paste inline when needed.
basically like regex replace without the regex.

@mohammadqamruddin1847

This is the craziest thing I saw. Man knows things.

@dbbr1442

this is magic as far as im concerned

@OxygenMagnet

In vscode this is just Ctrl+shift+alt+down, ctrl+shift+right, ctrl+x, home, shift+end, bkspace, then ctrl+v after typing the words u want

@ACat-_-WOEM

I be fighting a one eyed kirby in my dreams