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.
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.
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)
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}
4 ปีที่แล้ว +7
Super clear and actually entertaining explanation, thanks.
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
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.
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'm even more impressed with the fact that I learned that the symbol "#" is called octothorpe
that macro edit is GOLD
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
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.
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.
I was searching for this kind of video for ages. Thanks for the good work!
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?)
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}
Super clear and actually entertaining explanation, thanks.
The audio quality is refreshingly good! Nice video too! Thanks!
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
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
Based. I'm definitely going to have to watch this again.
At long last I found a video that doesn't just explain which reg is which, but actually makes real life usage examples
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.
A huge THANK YOU!!!
Great tutorial🎉 Thank you❤
This video is fantastic. Thank you.
Named registers explained really well.
Great video! Thank you!!!
29:34 You can just leave the search pattern empty, vim will automatically use the last search register.
great video, tyvm
This is fantastic, subbed for life
Thx for sharing
21:18 this is the real vim experience
Very helpful video, thank you!
Thanks for the video :)
that was interesting, thank you
Vim just keeps on giving
This is beautiful. I need to spend more time on those vim help pages.
This video was super valuable to me
Very helpfull, thank you.
Awesome content!
Dude you have a great voice lmao XD
Outstanding!
brilliantly explained, thank you !
Great video!
I would say thank you !
Soooo useful.
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.
this was great. also you have a amazing radio voice.
10:33 Definitely could have used the command-line-window there to avoid awkward editing.
:help cmdwin
Maybe I missed it, but after googling the smaller delete register is accessible via "-
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 %?
thanks a lot
amazing!
Love
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.
👍👍
can u tell : "How to clear the register" when its really messy
:let @x=""
(where x is the register name)
10:35
This is a bad example, since you can just record a new macro and do: @aA,j
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'))