554
I still don't get buffers (programming.dev)
you are viewing a single comment's thread
view the rest of the comments
[-] amphetaminisiert@feddit.nl 25 points 6 months ago

And I still don't really know how to use registers in vim 😂 I just use yy and paste 🥲

[-] Psaldorn@lemmy.world 29 points 6 months ago* (last edited 6 months ago)

You just do " (listen for next character as register name)

Then, say q,w,e etc, then yy to yank as normal.

So "wyy

To retrieve it you use "wp

To add to it "Wyy

To view them :reg

Remember you can make "w anything, like "x or "p

And each time you yank it gets pushed into the default register history "0 "1 "2 etc

[-] emergencybird@lemmy.world 6 points 6 months ago

I didn't know about registers, thank you for this!

[-] amphetaminisiert@feddit.nl 4 points 5 months ago

Ok I have to save that 🥲 thanks!

[-] o_d@lemmygrad.ml 2 points 5 months ago

Great explanation. Thank you!

[-] barsquid@lemmy.world 5 points 6 months ago

I only know how to use them with q. I hope that's a register, otherwise I will look foolish.

[-] suy@programming.dev 4 points 5 months ago

They are. Registers are just "named boxes" where you can store some text and/or keystrokes. When yanking and pasting, the unnamed register is used if you don't specify a name (you can still see or edit it explicitly). For recording a macro there is no default register, though. You need to give it a name.

this post was submitted on 11 May 2024
554 points (96.8% liked)

Programmer Humor

19488 readers
653 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS