Understanding The Vim Registers

  Рет қаралды 24,460

Beginbot

Beginbot

Күн бұрын

This video is in response to a question I got on stream around Vim Registers. If you are interested Tmux, Vim, Python, Go, Arch Linux, DevOps, Debates and Conversation related to software development, join the Stream and participate!
Here's an accompanying Blog post: www.davidbegin.com/10-vim-reg...
Twitch: / beginbot
Patreon: / beginbot
Gitlab: gitlab.com/beginbot
Github: github.com/davidbegin
Twitter: / beginbotbot
Blog: www.davidbegin.com

Пікірлер: 63
@user_null3696
@user_null3696 Ай бұрын
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.
@noabstruction
@noabstruction Ай бұрын
Thanks null
@ablanchi
@ablanchi 4 жыл бұрын
that macro edit is GOLD
@mangelozzi
@mangelozzi 4 жыл бұрын
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.
@FredMaterias
@FredMaterias 5 күн бұрын
I'm even more impressed with the fact that I learned that the symbol "#" is called octothorpe
@9bnmadden
@9bnmadden Жыл бұрын
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.
@cindysi63
@cindysi63 2 ай бұрын
So many useful tips. Love the tip on editing macro!! Thank you
@alexandrostsagkaropoulos
@alexandrostsagkaropoulos 6 ай бұрын
I was searching for this kind of video for ages. Thanks for the good work!
@velizarbodurski6005
@velizarbodurski6005 2 жыл бұрын
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)
@mattetis
@mattetis 5 ай бұрын
Is it possible to append easily to the unnamed as well? (Like without pasting the contents first and then yanking?)
4 жыл бұрын
Super clear and actually entertaining explanation, thanks.
@guyindisguise
@guyindisguise 4 жыл бұрын
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}
@theemacsen1518
@theemacsen1518 4 жыл бұрын
Dude you have a great voice lmao XD
@diarmaidmac2149
@diarmaidmac2149 3 жыл бұрын
The audio quality is refreshingly good! Nice video too! Thanks!
@mangelozzi
@mangelozzi 4 жыл бұрын
Instead of using ^r =system('ls'), in normal mode you can do :r !ls Where r is for the read and insert command
@glenn8459
@glenn8459 Жыл бұрын
Or you can do !!ls in normal mode which is very useful
@sevos
@sevos 3 ай бұрын
At long last I found a video that doesn't just explain which reg is which, but actually makes real life usage examples
@princeofexcess
@princeofexcess 2 ай бұрын
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.
@anishkapatel8393
@anishkapatel8393 Жыл бұрын
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
@devonmorris1992
@devonmorris1992 4 жыл бұрын
This is beautiful. I need to spend more time on those vim help pages.
@zach1912XD
@zach1912XD 3 ай бұрын
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
@al-du6lb
@al-du6lb 3 жыл бұрын
Based. I'm definitely going to have to watch this again.
@ryanwwest
@ryanwwest 7 ай бұрын
The selection register timestamp got pulled into the black hole register too. Lol but great video.
@lindat.7097
@lindat.7097 3 жыл бұрын
Great video! Thank you!!!
@kevinchang9616
@kevinchang9616 3 жыл бұрын
Very helpful video, thank you!
@shashanksharma21
@shashanksharma21 3 жыл бұрын
brilliantly explained, thank you !
@JoePescisAngryCousin
@JoePescisAngryCousin Жыл бұрын
This video is fantastic. Thank you.
@regvud
@regvud 2 ай бұрын
Thx for sharing
@nghialm269
@nghialm269 4 жыл бұрын
29:34 You can just leave the search pattern empty, vim will automatically use the last search register.
@sussusamogus7831
@sussusamogus7831 3 ай бұрын
great video, tyvm
@ChrisCox-wv7oo
@ChrisCox-wv7oo Жыл бұрын
This is fantastic, subbed for life
@konradchyrzynski8326
@konradchyrzynski8326 4 ай бұрын
Thanks for the video :)
@devgalileu
@devgalileu 7 ай бұрын
Awesome content!
@gjermundification
@gjermundification 2 жыл бұрын
Named registers explained really well.
@bronekszulc3272
@bronekszulc3272 2 жыл бұрын
This video was super valuable to me
@slipcurve1410
@slipcurve1410 3 жыл бұрын
this was great. also you have a amazing radio voice.
@jevessonsouza7947
@jevessonsouza7947 Жыл бұрын
A huge THANK YOU!!!
@serhiibudnik4379
@serhiibudnik4379 Жыл бұрын
that was interesting, thank you
@tiagodejesus456
@tiagodejesus456 Жыл бұрын
Great video!
@JohnBortins
@JohnBortins 2 жыл бұрын
Outstanding!
@michaelbaumeister4900
@michaelbaumeister4900 Жыл бұрын
Very helpfull, thank you.
@stracci_5698
@stracci_5698 2 жыл бұрын
Vim just keeps on giving
@PalinuroRex
@PalinuroRex 2 жыл бұрын
Soooo useful.
@miaomiao1415
@miaomiao1415 3 жыл бұрын
I would say thank you !
@_jdfx
@_jdfx 3 жыл бұрын
amazing!
@0xssff
@0xssff 3 жыл бұрын
thanks a lot
@pav5000
@pav5000 29 күн бұрын
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.
@al-du6lb
@al-du6lb 3 жыл бұрын
7:31 did you mean 3 hundred thousand "words" ? You did a great job with this video btw.
@scifregizmoguy
@scifregizmoguy 3 жыл бұрын
10:33 Definitely could have used the command-line-window there to avoid awkward editing. :help cmdwin
@saltrocklamp199
@saltrocklamp199 4 жыл бұрын
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 %?
@sumanth3036
@sumanth3036 9 ай бұрын
Love
@mangelozzi
@mangelozzi 4 жыл бұрын
Maybe I missed it, but after googling the smaller delete register is accessible via "-
@rashie
@rashie Жыл бұрын
👍👍
@matthewrease2376
@matthewrease2376 9 ай бұрын
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.
@no_name4796
@no_name4796 6 ай бұрын
10:35 This is a bad example, since you can just record a new macro and do: @aA,j
@swagatbaruah522
@swagatbaruah522 3 жыл бұрын
can u tell : "How to clear the register" when its really messy
@damian_madmansnest
@damian_madmansnest 8 ай бұрын
:let @x="" (where x is the register name)
@asdiasx
@asdiasx 2 жыл бұрын
Great video! Thanks ( please consider speaking a little slower... ;) )
@421sap
@421sap 5 ай бұрын
God bless you in Jesus' Name Amen ✝️
@serhiibudnik4379
@serhiibudnik4379 Жыл бұрын
I use Blackhole for x key because it's annoying to have last char in register every time :) (keymap.set("n", "x", '"_x'))
Learning Vim in a Week
23:51
thoughtbot
Рет қаралды 463 М.
Vim Tips You Probably Never Heard of
12:11
Luke Smith
Рет қаралды 115 М.
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 14 МЛН
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 56 МЛН
50 YouTubers Fight For $1,000,000
41:27
MrBeast
Рет қаралды 196 МЛН
Managing Your Splits In Vim
12:18
DistroTube
Рет қаралды 56 М.
Getting Starting With Tmux Isn't That Scary
21:35
Beginbot
Рет қаралды 14 М.
Vim Is Not An Editor, It's An Instrument!
38:18
Beginbot
Рет қаралды 22 М.
Improving Vim Speed
14:54
thoughtbot
Рет қаралды 288 М.
Vim Tips I Wish I Knew Earlier
23:00
Sebastian Daschner
Рет қаралды 45 М.
Advanced Vim Workflows
10:41
Semicolon & Sons
Рет қаралды 81 М.
10 Advanced Vim Features (You Probably Didn't Know)
21:47
Sebastian Daschner
Рет қаралды 68 М.
Use Ex commands in Vim
16:13
Dong Zhou
Рет қаралды 12 М.
0 to LSP : Neovim RC From Scratch
30:47
ThePrimeagen
Рет қаралды 1,2 МЛН
Опасность фирменной зарядки Apple
0:57
SuperCrastan
Рет қаралды 6 МЛН
Как правильно выключать звук на телефоне?
0:17
Люди.Идеи, общественная организация
Рет қаралды 1,9 МЛН
Сколько реально стоит ПК Величайшего?
0:37
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 61 МЛН
Looks very comfortable. #leddisplay #ledscreen #ledwall #eagerled
0:19
LED Screen Factory-EagerLED
Рет қаралды 2,4 МЛН
Samsung laughing on iPhone #techbyakram
0:12
Tech by Akram
Рет қаралды 2,9 МЛН