Тёмный

How To Use Vim/Neovim Macros For Next Level Productivity 

Josean Martinez
Подписаться 40 тыс.
Просмотров 12 тыс.
50% 1

Everything you need to know about Vim/Neovim to take your productivity to the next level and make it a lot easier & faster to complete repetitive tasks. Hope you enjoy it!
💻 Dotfiles: bit.ly/4cFlPyq
🎥 How I Setup Neovim: • How I Setup Neovim To ...
📧 Subscribe To My Newsletter: buttondown.email/josean
☕️ Help Support Me And The Channel: www.buymeacoffee.com/joseanma...
⏰ Timestamps
00:00 - introduction
00:18 - registers
01:57 - macros overview
03:08 - modifying macros
04:07 - repeatable macros
07:04 - appending to macros
08:18 - combining macros
09:23 - conclusion

Наука

Опубликовано:

 

11 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 49   
@joseanmartinez
@joseanmartinez 10 дней назад
Hey guys! After making this video, I realized that the repetitive nature of the macros I showed here isn't precisely recursive. To make a macro recursive, it needs to call itself. This will make the macro execute until it reaches the end of the file or doesn't fulfill a certain condition. Its essentially the same as doing something like 100@r to change 100 console.logs as in the video, but instead of specifying a number of times to repeat, the macro just calls itself and will execute until there are no more "console.logs" left. You can learn more about this here: vim.fandom.com/wiki/Record_a_recursive_macro.
@manrique.varela
@manrique.varela 10 дней назад
Great video, I didn't know macros were saved in registers I learn so much with your content, keep up with Vim videos.
@joseanmartinez
@joseanmartinez 10 дней назад
Happy to hear that!
@moomincare
@moomincare 10 дней назад
Finally, a new video! I've been eagerly waiting for your content. Your videos are always amazing. Keep up the great work!🎉🎉
@joseanmartinez
@joseanmartinez 10 дней назад
Thank you!! Sorry about the delay, I was out of office for a couple of weeks.
@stoicfloor
@stoicfloor День назад
Thank you so much for this video! Finally some vim/nvim content that is not for complete beginners. I have been using nvim for years and I didn't know about pasting and editing macros; they made me go "wow!" while watching your magic. I relly enjoy this video format of yours; such high quality video output. Keep up the great work!
@joseanmartinez
@joseanmartinez 22 часа назад
Thank you!!
@jeppe7328
@jeppe7328 7 дней назад
Golden content, straight to the point!
@user-hh4br5tk5p
@user-hh4br5tk5p 10 дней назад
This is great. Thank you so much as always!
@alfredomenezes8814
@alfredomenezes8814 9 дней назад
Really nice to know that, thank you!
@samyak039
@samyak039 9 дней назад
good video, was pretty informative. been using vim/neovim for about ~5 years, but didn't explored the macro in this depth. enjoyed it and learned too!
@robertojimenez8412
@robertojimenez8412 8 дней назад
love this video❤ concise but pretty useful
@joseanmartinez
@joseanmartinez 8 дней назад
Happy to hear that!
@JoshMedeski
@JoshMedeski 10 дней назад
Great video! Macros are so powerful, it's a helpful reminder that they can be overwritten and you can even dump the output, thanks!
@joseanmartinez
@joseanmartinez 8 дней назад
Thanks Josh!
@adamdrake39
@adamdrake39 10 дней назад
Finally a video really explaining macros and registers nice and clearly. Great stuff!
@joseanmartinez
@joseanmartinez 10 дней назад
Thank you!!
@ariasalmeida
@ariasalmeida 8 дней назад
Thank you Josean !
@dixitvara
@dixitvara 10 дней назад
One thing you can do, you can repeat the last action if you press period ( . ) so you don’t have to repeat the same thing again
@colin0516
@colin0516 8 дней назад
the @@ feature blew my mind. I record macros quote often, can't believe the concept of @@ has been right under my nose!
@joseanmartinez
@joseanmartinez 8 дней назад
Yes! I actually learned about it recently too!
@sarojregmi200
@sarojregmi200 10 дней назад
Learnt some new motions looking at the video, great video thanks
@joseanmartinez
@joseanmartinez 10 дней назад
Awesome!
@FrancoisKerisit
@FrancoisKerisit 10 дней назад
Great video, thank you ! I did not know macros were saved in register and editable.
@CodingWithAuryn
@CodingWithAuryn 9 дней назад
Thank you for this video :) i am a heavy daily vim user and still learn something :) Greetings
@machinima1402
@machinima1402 10 дней назад
Hi Josean! Love the way you explain in your videos. In neovim 0.10.0 my most recent contribution to the core was added where you can apply recorded macros to each visually selected line. This should work as well with multi-cursor selection :) Hope you find this useful. Sidenote: i'm trying to grow a streaming channel programming a few OSS contribs, do you mind if i add the channel to a reply in this comment? it's a bilingual channel.
@joseanmartinez
@joseanmartinez 10 дней назад
That’s awesome! Thanks for your feedback 🙏🏽 And sure thing, you can post the channel as a reply here
@machinima1402
@machinima1402 10 дней назад
@@joseanmartinez Thank you very much! The channel is "whodiscode" :) hope to see you there sometime
@supermeia28
@supermeia28 10 дней назад
Great video
@joseanmartinez
@joseanmartinez 10 дней назад
Thank you!
@codingwithrendi
@codingwithrendi 9 дней назад
you make me obssessed with neovim, so i can tell everyone : "I use neovim btw :)"
@joseanmartinez
@joseanmartinez 8 дней назад
🚀
@davidgroskind3233
@davidgroskind3233 9 дней назад
It looks like if you want to save your macro to use in the future, you have to open a new empty file, paste the register contents into the file, and save the file somewhere. To reuse the macro, you open the file where you want to use the macro, read the contents of the macro file into the file, and yank the line just added into a register as shown, and run the macro as shown. Seems like there should be a simple way to write the content of a register to a file the way you can write the contents of a file to a new file and a simple way to read the contents of a file directly into a register the way you can read a file into a file.
@sayanta01
@sayanta01 7 дней назад
which terminal font are you using ?
@ErmandDurro
@ErmandDurro 10 дней назад
Amazing content. I really enjoyed it 😃 I learned a couple of things that I didn't know, such as pasting the content of the macro, modify it and add it back. Very convenient. May I ask you what layout are you using for your corne? Would you mind sharing it? 😃
@joseanmartinez
@joseanmartinez 10 дней назад
Thank you! That’s great you learned some new stuff! This should be my layout: github.com/qmk/crkbd_rev1_3x6_josean.json. You can upload it to the qmk online configurator.
@ErmandDurro
@ErmandDurro 10 дней назад
@@joseanmartinez Great! Thanks a lot 😃
@RYKalmante
@RYKalmante 10 дней назад
Hi Josean, I hope you can find the time to create a Svelte tutorial.
@chrissmith6028
@chrissmith6028 11 дней назад
Do you have your config dotfiles available? I have hand written mine but just happy with them. Well except my hotkey for insert iso current date time.
@joseanmartinez
@joseanmartinez 10 дней назад
Yes! Here you go: bit.ly/4cFlPyq
@sadeepa_bandara
@sadeepa_bandara 3 дня назад
Hey josean, I finished my nvim configuration but when I open my project it shows [lspconfig] unable to find ESLint library. I think because of that it shows so many red error like Cannot find module 'react/jsx-runtime'. can you help me please. Thanks in advance ❤ Additional: when I press space+ff it pop up find files window but when I search there it doesn't show any results. Please I need help for these ones. Update: my fzf is not working properly it shows: [Command failed: rg --files --hidden --glob "!.git/*"]
@gbarkhatov
@gbarkhatov 10 дней назад
Hey mate, what about a video about Helix?
@mathiaz943
@mathiaz943 10 дней назад
Fantastic!
@joseanmartinez
@joseanmartinez 8 дней назад
Awesome, thanks!
@chimeces
@chimeces 10 дней назад
No love for @@ ? If you want to repeat the last macro you run, you can just tap @@ and it will run it, very useful for repeating macros! And @ has more magic! Try combining it with the other special registers, like @: to run the last command line command you ran!
@joseanmartinez
@joseanmartinez 10 дней назад
I mention @@ in 3:05. Thanks for the tips!
@chimeces
@chimeces 10 дней назад
@@joseanmartinez I missed it! :D great video 👍
@joseanmartinez
@joseanmartinez 10 дней назад
@@chimeces thank you! 🙏🏽
Далее
7 Amazing CLI Tools You Need To Try
18:10
Просмотров 263 тыс.
Как быстро освоить Vim / Neovim?
23:31
How Many Balloons Does It Take To Fly?
00:18
Просмотров 33 млн
How to ACTUALLY switch from VS Code to Neovim
5:09
Просмотров 188 тыс.
The Only Debate That Matters: Vim VS Emacs
19:47
Просмотров 11 тыс.
Vim Tips I Wish I Knew Earlier
23:00
Просмотров 42 тыс.
Everything Starts with a Note-taking System
21:23
Просмотров 121 тыс.
Why Neovim nerds are so obsessed with the terminal
6:44
That One Micro Talk on Macros (NeovimConf 2023)
9:57
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Игровой Комп с Авито за 4500р
1:00