
Vim Macros Make The Impossible Possible DistroTube
video description
Date: 2022-03-30
Related videos
Comments and reviews: 8
Charlyjaja
Hey distrotube, great video!
Just to point it out, I think the first macro didn't work as expected: In case you have two consecutive United States entries in your mirror list, the second one will be removed (you can in fact see it with the example you showed on video)
Regards
reply
Hey distrotube, great video!
Just to point it out, I think the first macro didn't work as expected: In case you have two consecutive United States entries in your mirror list, the second one will be removed (you can in fact see it with the example you showed on video)
Regards
reply
Alejandro
Hi. Big fan of Vim here. But... Isn't this (the first one) the kind of task sed was created for?
I think $ sed -ni '/United/,+1p' does the job (please correct me if i am wrong).
But anyway, great video (as usual).
reply
Hi. Big fan of Vim here. But... Isn't this (the first one) the kind of task sed was created for?
I think $ sed -ni '/United/,+1p' does the job (please correct me if i am wrong).
But anyway, great video (as usual).
reply
Mig
I try to avoid macros as a general policy, you can pretty much do anything a macro can using :global :normal and :substitute. Macros are a bit of a failure to think about a better way of doing things.
reply
I try to avoid macros as a general policy, you can pretty much do anything a macro can using :global :normal and :substitute. Macros are a bit of a failure to think about a better way of doing things.
reply
AtomToast
Oh, also did you know that there is a :move command to move lines around? It's such a common task that you should absolutely use it. I have it set to move the current line up and down to alt+j/k
reply
Oh, also did you know that there is a :move command to move lines around? It's such a common task that you should absolutely use it. I have it set to move the current line up and down to alt+j/k
reply
Buddy
dG will delete to the end of the file
/-Date will only find lines with Date at the very start of the line
and you can run macros over a visual selection
nice vid, thanks for all you do.
reply
dG will delete to the end of the file
/-Date will only find lines with Date at the very start of the line
and you can run macros over a visual selection
nice vid, thanks for all you do.
reply
EliteTester
Irrelevant question but which colorscheme are you using for vim? The dotfiles seem to be missing a call to colo [yourcolorscheme]. Im asking because it seems identical to the one I use.
reply
Irrelevant question but which colorscheme are you using for vim? The dotfiles seem to be missing a call to colo [yourcolorscheme]. Im asking because it seems identical to the one I use.
reply
Brian
I like how the question is -How can I sort this file- and the answer isn-t simply :sort
I know the rest of the question is -...using something like a vim macro- but c-mon.
reply
I like how the question is -How can I sort this file- and the answer isn-t simply :sort
I know the rest of the question is -...using something like a vim macro- but c-mon.
reply
LinuxTutorials
Second macro: it's better to search for /-Date: to ensure to find the word Date at the beginning of any line. This way it wont mess up your file at the head of it
reply
Second macro: it's better to search for /-Date: to ensure to find the word Date at the beginning of any line. This way it wont mess up your file at the head of it
reply
Add a review, comment















