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.
I can’t tell if ops joke is “intentionally confusing buffers with registers” and everyone is playing along or if people aren’t making the distinction between the two in this thread.
Which is ironic and humorous…potentially by accident.
My thought process based on when I setup my config: “yank copies to my main ‘buffer’, <leader> yank copies to system clipboard through that special ‘buffer’, and <leader> delete deletes without replacing what’s in my main ‘buffer’. I have multiple clipboards!”
Completely forgot they’re called registers and that buffers are just “where text is” (at least as far as I understand it)
I kind of assumed that his comment was independent of the meme he posted and served more to underline a perceived power that vim has over other editors. In this case a power OP doesn’t even understand/use himself.
What do you mean by regular target? I am either yanking from the OS buffer or yanking things from 2 different buffers. Or I have 2 macros where they yank from different buffers.
I think you mean registers not buffers. buffers are file(s) loaded in memory while registers contain text yanked/deleted/last command/last search, etc.
Well, LLMs are, at least. But also, autocomplete is already AI, so really LLMs are just glorified AI. And that checks out, they are the ones that get all the glory*. Everything else is just spooky algorithms.
don’t get the negativity towards copilot in other comments.
it’s a really smart autocomplete, and this is exactly what i wanted for the past 5 years.
(yeah it’s not going to replace programmers or whatever people’s exaggerated opinions of it are)
wanna quickly create a wgpu bind group? let texture_bind_group = <tab> <tab> and it’s smart enough to understand the context and pull in texture and texture sampler that are already defined as local variables.
too lazy to type this obvious thing in?
(like of course the next opcode islet op = self.fetch();) just press tab and move on with your life.
wanna quickly refactor something?
select, ask CP Chat to “replace all if statements with match”, check if it’s correct and click confirm (it will even show git-style diffs, so it’s hard for something unexpected to slip in)
it’s not perfect, and it’s suggestions do not match your intention like 50% of the time but when they do match or your intention is REALLY obvious (like you already wrote a clear and concise variable name and need to complete the value), you’re a single keypress away from completing those 2 lines of code
It’s not a total deal breaker but it’s definitely very useful. (especially for me, because of my very short attention span. unless i can quickly complete a thing I’m currently working on in less than a minute i will forget about the next 10 things I was thinking of doing)
also i don’t believe the price is justified, but it’s free for students so of course I’m gonna use it.
(you just need to verify your student email and upload a photo of your student id on education.github.com, and you get a free gh copilot subscription, gh pro account, priority support and promos on loads of services like heroku etc while you’re a student)
This has been the thing for me. I get really bored and lose focus when doing all the obvious repetitive stuff. And the obvious stuff is the stuff I find copilot does best. For anything that requires thought I’m engaged. Those are the fun parts of the job. It lets me do more of the fun part.
The one major downside that I’ve found is that sometimes I just want to tab complete a long variable/function name, and because of copilot i dont have “old style” tab completion anymore. (I could definitely still handle this myself, but i haven’t)
edit: this all to say that I don’t use copilot to write code that I don’t know how to write, I use copilot to write code that I’ve written 1000 times before and don’t want to write again. Copilot does a good job of looking through all the open files for context to help make sure the suggestions actually fit into the codebase’s pre-existing style.
well I’m using lower-ish-level stuff like wgpu a lot, so there’s a lot of repeated code in my codebase with only small variations, but I can’t really encapsulate it into anything since all of my pipelines are completely different and have different requirements (it’s basically already as encapsulated as it gets without limiting freedom)
What’s CP Chat? Im a bit afraid to type that into a search engine but it seems to be what I’m missing in my Copilot-assisted flow. It’s a great autocomplete but sometimes refactoring would be useful too.
You got it admit, it is a good suggestion. It just wasn’t the right one. But it is trained well enough to correlate left and right together. Since those are very commonly associated together it is certainly a logical choice.
Ah, come-on, why do you think Eliza could do that 60 years ago?
(It couldn’t. It’s at most 40 years old technology, and way more likely just 30. Even though you could program Eliza to do something like this, it would be way too specific for any use.)
Within IDEs people go out of their way to install Intellisense so that "shit randomly pops up while they're typing." There are companies whose whole existence depends on people wanting that to happen.
I had to learn emacs for my engineering computation class, up to the point that we were required to present our code in emacs if we had questions to ask during office hours.
I’m just an emacs … enjoyer (…?) and I just don’t understand the post. I’m pretty sure buffers here refer to something different from emacs buffers as they’re completely unrelated to clipboards. Then from a quick scan of the plug-in mentioned it seems to mimic the clipboard ring emacs has had for many decades (always?).
This wasn’t made for programmers. It was made for middle management who think the reason the ticket is taking so long is because the devs can’t type more words per minute.
The other poster is either speaking from a place of ignorance, as they’ve never really used it, of they just aren’t smart enough to learn how to use a new tool.
As much as middle management sucks, devs blaming management for their own inability to learn is almost on the same level.
i mean i still think tab/auto completion is good to save time.
the problem is when people become reliant on it and just have it write entire chucks of code without going through it and checking it or changing it after the baseline is done.
Yeah, usually it’s pretty good autocomplete. Definitely makes my coding faster (and highlighting a chunk of SQL and asking it to modify it in plain English is magic)
Stuff like this is really useful when variable names are annoying, or when you have to repeat the same monotonous pattern over a large batch of code.
My favorite use of AI in code so far has been refactoring deprecated feature flags. “Replace enableXYZFeatureFlag with true and optimize the code”. Bam, 1-2 hours’ worth of crunch work solved in minutes.
If it takes 1+ hours of work to remove a feature flag branch in an area of code, I wouldn’t trust the correctness of anything the AI writes and would be super skeptical about anything the humans had written.
Can you please describe how you do this? I thought Github Copilot can only make changes to the currently open tab? It’s been a few months since I’ve used it, and I’ve only used the Visual Studio version, which I think isn’t as good as the Visual Studio Code version. Has Copilot already gotten to the point where you can tell it to make changes to an entire codebase?
I do go file by file, but I just copy and paste the same query into each. It also gives me a chance to do a quick review before moving on. It’s still a manual process but it’s a HELL of a lot faster than manually refactoring.
(I can’t give too many more details though since I use proprietary software that isn’t public facing)
You could say that about any kind of autocomplete. Why would people install snippet plugins into their vim/emacs? Sure you can just type everything by hand but it’s just more convenient.
Personally I find these kinds of inline AI suggestions make a more convincing use case than trying to prompt engineer a Chat based LLM and diverting your attention to phrasing specifics instead of the actual problem space.
I don’t have the name handy, but there’s at least one plugin for vim that shows buffer previews in a popup. I’ve got it mapped to leader-sb (for “show buffer”).
So far I haven’t been brave enough for that feature. It’s either “that main place yank goes”, “system clipboard”, or “that place that makes it disappear” for me
You can see all registers in use with :registers, to paste from a register say "2 in insert mode use key combination <ctrl-r>2 or in normal mode "2p. You can check out more in :help registers. Unnamed register or “” is the system clipboard I think. To copy texts in a register you can prepend yank (/delete/cut, etc.) with that register "_ (for black hole register[^black_hole]) This is for neovim. Have keybinds for them and there saved you a plugin :D
[^black_hole]: Text yanked in this register is gone, i.e. it’s not saved in any register.
programmer_humor
Newest
This magazine is from a federated server and may be incomplete. Browse more on the original instance.