Vim Macros Are A Game Changer

Ғылым және технология

In this video we look at vim macros and how to use them to speed up our coding speed.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
🐍 The Python Bible Book: www.neuralnine.com/books/
💻 The Algorithm Bible Book: www.neuralnine.com/books/
👕 Programming Merch: www.neuralnine.com/shop
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine.com/
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/NeuralNine
🎙 Discord: / discord
🎵 Outro Music From: www.bensound.com/

Пікірлер: 38

  • @slipcurve1410
    @slipcurve1410 Жыл бұрын

    pro tip: any time you want to delete two lines use dk or dj. it deletes the line you're on and the line you move into. d is on the left hand and j/k is on the right, so it's super fast, especially compared to "dd dd" (which only works from the top)

  • @sp3ctum

    @sp3ctum

    5 ай бұрын

    For double speed you can also do dj. (dj and the repeat operation). I like the feeling of rolling this with my fingers

  • @slipcurve1410
    @slipcurve1410 Жыл бұрын

    you can do arithmetic operations with vim: in insert mode press ctrl-r and then =. if you want to add 100 to all the numbers, yank the number (in the macro in this case), go into insert mode, go into arithmetic mode, paste the number you yanked and add + 100 (enter), exit insert mode, delete the original number which is now at the end of the arithmetic result and you're done. this is a more general way of doing it than repeating things like ctrl-a. you can also do operations with floating points, just add decimal indicator with .0.

  • @priyeshagarwal2644
    @priyeshagarwal26446 күн бұрын

    vim macros could be useful in C++ where you have to want to write declarations inside the class, and definitions outside the class. You can record a macro that copies the declaration, and creates an empty definition. Then you can repeat it for all such methods.

  • @nacdan6451
    @nacdan64512 жыл бұрын

    They totally are. At my job we collapse SQL migrations every release cycle and using vim macros made converting a huge sql script to generate dozens of tables to a list of strings take a couple minutes as opposed to 30+ manually haha.

  • @enriquemillanvalbuena5241
    @enriquemillanvalbuena5241Ай бұрын

    Hey! Thx for your video man, specially being so open about letting the macros fail live. It has given me a better feeling of what actually using macros feels like.

  • @davydorynbaev
    @davydorynbaev2 жыл бұрын

    Very useful video, thanks!

  • @jissoune2009
    @jissoune20092 жыл бұрын

    great video tks !

  • @zytr0x108
    @zytr0x1082 күн бұрын

    Super, danke!

  • @user-ri8ow3qh7l
    @user-ri8ow3qh7l Жыл бұрын

    Wow, very cool, need more complex macros, vim is the best editor

  • @ralphlagos4210
    @ralphlagos42102 жыл бұрын

    Really useful! But couldn’t help but feel like introducin this to my team will leave them saying “that could be done w python”

  • @underrated_mono9770
    @underrated_mono97702 жыл бұрын

    Cool Microphone. Is it still available? Excuse me for off topic.

  • @godDIEmanLIVE
    @godDIEmanLIVE4 ай бұрын

    German accent + German book shelves + German vimming = perfection

  • @NeuralNine

    @NeuralNine

    4 ай бұрын

    Austrian* :)

  • @mertemr
    @mertemr2 жыл бұрын

    How long have you been using vim?

  • @Zippythrone
    @Zippythrone3 ай бұрын

    I have NVIM v0.9.5, but when I input [ vim.cmd('set number') ], and try to source it, it doesn't allow me to. I installed neovim through homebrew. Has anyone encountered this?

  • @gjermundification
    @gjermundification8 ай бұрын

    How can one format text in vim? More than indenting; like I would like my code to follow the doom document; 1 space inside brackets amongst others. As pr example: func myFunc( parameter: Int ) {} I hate the way Apple XCode reduces legibility by func myFunc(parameter: Int) {} I know I can make macros for this, however there should be a way to [ab]use LSP.

  • @thecodfather7109
    @thecodfather71092 жыл бұрын

    Hey dude, Would you be able to show us how to create a user form for example which acts as a front end entry that uses Google Sheets as a database? That would be cool.

  • @ralphlagos4210

    @ralphlagos4210

    2 жыл бұрын

    You mean google forms

  • @thecodfather7109

    @thecodfather7109

    2 жыл бұрын

    @@ralphlagos4210 but instead of a Google form, a GUI which connects to the Google sheets API

  • @xtravivid5203
    @xtravivid52032 жыл бұрын

    The blogs were 😀👍🏻

  • @user-ri8ow3qh7l
    @user-ri8ow3qh7l Жыл бұрын

    Why you don't create a repo for this video, to take the dummy data for test?

  • @taze9092
    @taze90922 жыл бұрын

    any tips on getting motivation to learn vim?

  • @aymancassim8944

    @aymancassim8944

    2 жыл бұрын

    You can 1st start by using the extensions from like VsCode or Pycharm cause at 1st it will be difficult to know the exact keybinds, so you can revert back easily if you dont know a specific keybind, it will be easier and then you will be able to build up muscle memory for the keybinds

  • @NeuralNine

    @NeuralNine

    2 жыл бұрын

    Look at George hotz coding for an hour. Also, learning vim takes a week or two max if you commit

  • @vrishabh07
    @vrishabh074 ай бұрын

    How to get the index numbers like 4321234 in vim ?

  • @rajm5349
    @rajm53492 жыл бұрын

    how to use qa, q etc in anaconda jupiter while typing should we use 'control' and then type q and a kindly clarify it

  • @thepaulcraft957

    @thepaulcraft957

    2 жыл бұрын

    i dont know this specific case, but normaly you have to press ESC to get in normal mode and using all this keybinds

  • @msatul1305
    @msatul13052 ай бұрын

    WOW

  • @aditya_asundi
    @aditya_asundi2 жыл бұрын

    Hello

  • @Blattealkiller
    @Blattealkiller Жыл бұрын

    Nice one, too bad the first example can be solved with g+Ctrl-a, makes it less satisfying to solve with a macro

  • @philpeko1796

    @philpeko1796

    9 ай бұрын

    Which example, please, and how so?

  • @Blattealkiller

    @Blattealkiller

    9 ай бұрын

    @@philpeko1796 The one with the macro where he increments the numbers on each line (i.e at 3:55). You can instead do the same thing of copying all lines, visually select them, and press g+Ctrl-a

  • @philpeko1796

    @philpeko1796

    9 ай бұрын

    @@Blattealkiller Nice! Thank you very much. ❤👍🖖

  • @Awwe12675
    @Awwe126752 жыл бұрын

    Which time you convert to islam

  • @fesprogrammer605
    @fesprogrammer6052 ай бұрын

    Nacho

  • @sinistergroupon
    @sinistergroupon2 жыл бұрын

    Coding speed? No one codes at 60 wpm. You’re not writing an essay. Coding is slow and deliberate. So what if you saved 20 seconds not repeating yourself when you send 20 min googling your problem.

  • @421sap
    @421sap4 ай бұрын

    In Jesus' Name Amen ✝️

Келесі