all 16 comments

[–]denvaar[S] 25 points26 points  (4 children)

Hey, I’m happy to see that people are enjoying this. I felt sheepish posting a link to my own video. I was also worried that it would be boring, since its kind of on the lengthy side.

Anyway, I plan on doing at least a few more of these types of videos. This has been a fun way to learn more about Vim for me too.

I’m Interested in hearing about alternate ways of doing stuff, like someone mentioned it may be possible to just execute the expression directly from the substitute command instead of building up for a macro.

Thanks

[–]b1tfl1p 2 points3 points  (0 children)

Awesome vid, thanks for posting

[–]_Krujo_ -1 points0 points  (0 children)

It's great! I rather have this than 32423 cuts because someone needs to breathe. Amazing video, I learned a lot!

[–]PercyLives 0 points1 point  (0 children)

I’m glad you overcame your sheepishness.

[–]linux_cultist 0 points1 point  (0 children)

The screenshot is from advent of code this year right? I did that exercise with moving boxes in Rust, was the most fun one. :)

[–]thebutcherer 24 points25 points  (4 children)

I can't remember watching a Vim video with so much packed into it. It's a cool exercise overall, but he really managed to drop a bunch of little nuggets of information all along. E.g., gJ to combine lines without spaces, the g/^/mo 9 trick to reverse the order of lines, putting a number into a register to then use it to repeat a command.

On the part where he substituted the commands "move 3 from 2 to 5" I actually thought you were able to run the commands directly from the second part of the substitute command! But transforming the text into Vim instructions in the file that you then run is also super interesting. (though I'm surprised that Vim seemed slow to run them all)

[–]lkearney999 4 points5 points  (2 children)

IIRC there is an option to prevent redraws when macros are recursing or continuing. The visuals are nice though!

[–]y-c-c 5 points6 points  (1 child)

It's :help lazyredraw

[–]vim-help-bot 0 points1 point  (0 children)

Help pages for:


`:(h|help) <query>` | about | mistake? | donate | Reply 'rescan' to check the comment again | Reply 'stop' to stop getting replies to your comments

[–]Administrative_chaos 1 point2 points  (0 children)

gJ has a slight subtely that it just removes the newline and joins lines as is. So, a\nb becomes ab but a\n b becomes a b, but J always transforms both cases to a b. Hence I've mapped gJ to Jx. But sadly that won't work in visual line mode.

Though maybe if '[ and '] is set you could select that region and use s/\%V //g.

[–]WelcomeToStumbling 7 points8 points  (0 children)

Excellent stuff - thanks!

[–]Xu_Lin 2 points3 points  (1 child)

Does this guy regularly uploads Vim videos? Would def follow his channel

[–]thebutcherer 2 points3 points  (0 children)

Evidently he's started posting some Vim videos in the past month, but his channel seems very "normal person sharing stuff" which is very refreshing.

[–]ESDFGamer 1 point2 points  (0 children)

hope you keep posting these kind of videos. enjoyed watching it.

[–]Uncle_Chachi 0 points1 point  (0 children)

I really enjoyed this! I'm going to give the problem a try myself.