7:45 The small delete register stores deleted characters (content within a line), whereas numbered registers are used to store deleted lines. The reason s, x, X, c, C, d, D work is because they delete characters, whereas dd, S delete a line It is very useful because it can store content of commands like "diw", whereas numbered registers cannot.
Black hole register is also very useful when writing vim script / plugins and you wish to not change the state of the users registers when performing some commands.
another fun detail with named registers (such as "a, "b) is that they are aliased also to "A and "B, and when you yank & delete into "A - you're appending text the corresponding named register (not replacing its content, which would happen if you use "a)
for black hole register. if you deleted something you want to paste but on the way to pasting you encounter something you want to delete, i use the black hole register so I dont override my previous delete/yank. In my nvim i have a command setup just for this so i can keep pasting without overriding what im pasting. I will select something i want to paste over then do p to paste over it. with just p whatever i had selected would end up in my unnamed register so i loose my original yank.
14:35 Instead of using Ex-mode and copying the last command with :: you can just type @: from normal-mode (I somehow learned this by accident) PS: great video, I learned a lot! edit: it's even in the vimhelp :h @: @: Repeat last command-line [count] times. {not available when compiled without the +cmdline_hist feature}
my favorite black whole usage is when I want to keep something in the unnamed register but I also want to delete something, _"d is often a very natural way to accomplish it
12:00 OMG, these macros are like multicursor but so much worse. Because it's very easy to accidently mess it up and takes a long time to fix your mistake. When using multicursor you see the result immediately and can undo your last action and just use another.
I have + and * configured to be different clipboards. I use KDE on my system, so one of them copies to klipper, but I don't *always* run KDE on my system, so the other one copies to xclip.
7:45 The small delete register stores deleted characters (content within a line), whereas numbered registers are used to store deleted lines.
The reason s, x, X, c, C, d, D work is because they delete characters, whereas dd, S delete a line
It is very useful because it can store content of commands like "diw", whereas numbered registers cannot.
Thanks null
that macro edit is GOLD
I'm even more impressed with the fact that I learned that the symbol "#" is called octothorpe
Black hole register is also very useful when writing vim script / plugins and you wish to not change the state of the users registers when performing some commands.
I have watched this four times in the past year! What an awesome video which definitely leveled up my vim game! Thanks for the great tutorial.
another fun detail with named registers (such as "a, "b) is that they are aliased also to "A and "B, and when you yank & delete into "A - you're appending text the corresponding named register (not replacing its content, which would happen if you use "a)
Is it possible to append easily to the unnamed as well? (Like without pasting the contents first and then yanking?)
for black hole register. if you deleted something you want to paste but on the way to pasting you encounter something you want to delete, i use the black hole register so I dont override my previous delete/yank.
In my nvim i have a command setup just for this so i can keep pasting without overriding what im pasting.
I will select something i want to paste over then do p to paste over it. with just p whatever i had selected would end up in my unnamed register so i loose my original yank.
14:35 Instead of using Ex-mode and copying the last command with :: you can just type @: from normal-mode (I somehow learned this by accident)
PS: great video, I learned a lot!
edit:
it's even in the vimhelp
:h @:
@: Repeat last command-line [count] times.
{not available when compiled without the
+cmdline_hist feature}
I was searching for this kind of video for ages. Thanks for the good work!
my favorite black whole usage is when I want to keep something in the unnamed register but I also want to delete something, _"d is often a very natural way to accomplish it
The audio quality is refreshingly good! Nice video too! Thanks!
Instead of using ^r =system('ls'), in normal mode you can do :r !ls Where r is for the read and insert command
Or you can do !!ls in normal mode which is very useful
Super clear and actually entertaining explanation, thanks.
At long last I found a video that doesn't just explain which reg is which, but actually makes real life usage examples
29:34 You can just leave the search pattern empty, vim will automatically use the last search register.
awesome video just brushed up my vim reg knowledge
editing macros was eye opener
cant even tell you how many times i had to redo macro recordings
So many useful tips. Love the tip on editing macro!! Thank you
The selection register timestamp got pulled into the black hole register too. Lol but great video.
Based. I'm definitely going to have to watch this again.
This is fantastic, subbed for life
Named registers explained really well.
This is beautiful. I need to spend more time on those vim help pages.
Great video! Thank you!!!
This video is fantastic. Thank you.
this was great. also you have a amazing radio voice.
Very helpful video, thank you!
12:00 OMG, these macros are like multicursor but so much worse. Because it's very easy to accidently mess it up and takes a long time to fix your mistake. When using multicursor you see the result immediately and can undo your last action and just use another.
7:31 did you mean 3 hundred thousand "words" ? You did a great job with this video btw.
I have + and * configured to be different clipboards. I use KDE on my system, so one of them copies to klipper, but I don't *always* run KDE on my system, so the other one copies to xclip.
21:18 this is the real vim experience
Dude you have a great voice lmao XD
10:33 Definitely could have used the command-line-window there to avoid awkward editing.
:help cmdwin
This video was super valuable to me
brilliantly explained, thank you !
Great tutorial🎉 Thank you❤
The behavior of % in ex mode is to splice in and modify the contents of the "% register without needing to type ctrl-r%. Is that behavior unique to %?
A huge THANK YOU!!!
Awesome content!
Maybe I missed it, but after googling the smaller delete register is accessible via "-
Thanks for the video :)
Great video!
great video, tyvm
that was interesting, thank you
Thx for sharing
Vim just keeps on giving
Very helpfull, thank you.
10:35
This is a bad example, since you can just record a new macro and do: @aA,j
Outstanding!
I would say thank you !
Soooo useful.
can u tell : "How to clear the register" when its really messy
:let @x=""
(where x is the register name)
thanks a lot
amazing!
👍👍
Love
Great video! Thanks ( please consider speaking a little slower... ;) )
God bless you in Jesus' Name Amen ✝️
I use Blackhole for x key because it's annoying to have last char in register every time :)
(keymap.set("n", "x", '"_x'))