I recently learned about `cdo` and I was just wondering `what's the difference between that and cdo?` haha and you just exaplained that in a very easy to understand approach. Thanks!
@benfrainuk6 ай бұрын
Excellent. Some good extra nuance in the gist by Integralist that’s linked in the description 👍
@leiswatch85896 ай бұрын
Thanks for this video, great tutorial! I didn't know about cfdo, I have been using cdo, but it's time to change that :)
@dominykasbartkus10333 ай бұрын
Thanks, that's very comprehensive.
@adheusrangel3 ай бұрын
Thank you! I've been postponing this learning for ages.
@michaelkastner36113 ай бұрын
You're not alone. Been using (Neo)Vim for many years but never found a good explanation for global search. I'll frame this one.
@driden19876 ай бұрын
TIL update command exists. Thanks Ben.
@OmGdoob3 ай бұрын
Thank you! Impressive tip!
@BhargavaMan6 ай бұрын
Ben you're a legend
@colin72706 ай бұрын
Hi Ben, I saw your dotfiles repo is empty. Any plans to share your config? Looks clean!
@benfrainuk6 ай бұрын
Ah! Just added a link to the description. They are in a gist here: gist.github.com/benfrain/97f2b91087121b2d4ba0dcc4202d252f (ones that start x are unused plugins currently)
@colin72706 ай бұрын
@@benfrainuk Thanks a lot! I appreciate this very much. Subscribed. :)
@vext0125 күн бұрын
I tend to use ambr for this kind of thing. Little unix utility written in rust.
@user-ot1dv6ri4f4 ай бұрын
does refactor in coc.vim not work in php?
@benfrainuk4 ай бұрын
Don’t use CoC. But LSP replace (assuming that is the kind of thing you mean) only works in certain languages, and of those, the ones you have an LSP installed for.
@norlock6 ай бұрын
Why won't you use the LSP rename functionality? You basically use the LSP function to rename and don't have to worry about references that are not part of whatever you are renaming. Meaning if a local object has a similar name inside a function that needs to keep its name it won't change that. And LSP refactor is similar to a regular IDE rename function. I have the following keybinding: `vim.keymap.set('n', 'r', vim.lsp.buf.rename, {})` and then you do `:wa` to write to all the buffers
@benfrainuk6 ай бұрын
You don’t always have an LSP.
@norlock6 ай бұрын
@@benfrainuk I do appreciate your time and effort, so keep up the good work 👍. But for most languages you have one (including PHP). The description + intro makes it sound that this is the way to do it in Neovim which is not really true, only in cases where you don't have a LSP for that project (obscure languages). Anyway still think this is interesting, but I just wanted to post this because the LSP rename function is much more convenient for most users.
@benfrainuk6 ай бұрын
@@norlockI use LSP rename plenty too but there are often occasions when I am working on a bunch of JSON and text files or just some random string that doesn’t sit well with LSP so need to do this on occasions where LSP won’t help
@Danielo5156 ай бұрын
Is location list only for one file? So that is the difference...
@benfrainuk6 ай бұрын
One window as opposed to whole session. Here is a good overview with more info: freshman.tech/vim-quickfix-and-location-list/
@adriansrfr2 ай бұрын
Instead of cfdo, why not bufdo?
@benfrainuk2 ай бұрын
Because the files are in the QuickFix list when I want to make changes to them
@EpsilonKu6 ай бұрын
I'm one of the devs of nvim-spectre (after inactivity of windwp). It's hard to keep it up. Maybe better people make replace and find without plugins tho. Let spectre rest, lmao.
@benfrainuk6 ай бұрын
I can imagine it’s often a thankless task, so thanks 🙏
@MagicDuckify6 ай бұрын
Thanks for the work you do! Spectre can be a little buggy sometimes but its worlds better than the quickfix workflow. I think the idea of the search and replace ui as a buffer and seeing how your changes will look live is genius.
@Manmanolo1154 ай бұрын
Cool and all, but typing the search term again is.. not so good