Advanced Multiline Editing in Neovim

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 มิ.ย. 2024
  • In this video I walk through how to use many different techniques to edit multiple lines at once in Neovim. Visual Block Mode, Regex search and replace, vim-visual-multi plugin, and many more!
    Multiline Editing Pt 1: • Multiline Editing in N...
    Plugin: github.com/mg979/vim-visual-m...
    github.com/terryma/vim-multip...
    Remaps:
    github.com/exosyphon/nvim/blo...
    github.com/exosyphon/nvim/blo...
    Neovim config: github.com/exosyphon/nvim
    Twitter: / exosyphon
    Website: andrewcourter.com
    Twitch: / exosyphon
    Mechanical keyboard apparel: andrewcourter.creator-spring....
    Enjoy the content? You can buy me a coffee: www.buymeacoffee.com/andrewco...
    TubeBuddy: www.tubebuddy.com/andrewcourter
    Gear:
    Mic: amzn.to/40GUGFg
    Mic Interface: amzn.to/3YGxaGE
    Mic preamp: amzn.to/3XtBXtY
    Webcam: amzn.to/3OEOZRU
    Boom Arm: amzn.to/3qLr0GE
    Vissles (VS II switches): vissles.com/?ref=69zn8aei20 - Coupon Code for $5 off: ANDREWCOURTER
    IQUNIX F97 (TTC ACE switches): iqunix.store/collections/f97-...
    Audo:
    Karl Casey @ White Bat Audio
    • Chill Synth / Synthwav...
    0:00 Intro
    0:56 Personal Thoughts
    1:37 Selecting Text
    4:28 Changing Text
    5:20 Surrounding Text
    9:15 Multiline Swaps
    11:33 Renaming Variables
    13:57 Outro
    #neovim #coding #programming
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 28

  • @mbwilding
    @mbwilding 3 หลายเดือนก่อน +1

    This was great. Thanks for the regex tips too!

  • @cody_codes_youtube
    @cody_codes_youtube 10 หลายเดือนก่อน +2

    Yo, new camera angle! Love it!

  • @JamieAlban
    @JamieAlban 8 หลายเดือนก่อน

    seems useful - I use a lot of q macros to do a lot of these multi-location editing things, but sometimes it gets awkward or challenging to record a sufficiently accurate macro the first time. The instant visual feedback seems more forgiving.

  • @jettlaggg
    @jettlaggg 10 หลายเดือนก่อน

    I wanna see more neovim content! new sub!

    • @ascourter
      @ascourter  10 หลายเดือนก่อน

      Thanks! Just recorded a video on my Telescope config so hopefully can get that one editing soon and launched! Let me know if there are other topics you are interested in.

  • @neunmalelf
    @neunmalelf 10 หลายเดือนก่อน

    Good Voice 👍 Nicely done content.

  • @cody_codes_youtube
    @cody_codes_youtube 10 หลายเดือนก่อน +1

    Nice dude, I enjoyed the video. I didn't know you could do this stuff. What are you using to do the key press recording?

    • @ascourter
      @ascourter  10 หลายเดือนก่อน +1

      Thanks! There's a surprising number of ways I've found. That screen key capture is called KeyCastr

  • @irfanfauzi8704
    @irfanfauzi8704 8 หลายเดือนก่อน

    Love your vids

    • @ascourter
      @ascourter  8 หลายเดือนก่อน

      Thank you! Working on a video for LazyVim v10 that released today. Hope to release soon!

    • @irfanfauzi8704
      @irfanfauzi8704 8 หลายเดือนก่อน

      Keep it up man. We need more neovim content.

  • @farzadmf
    @farzadmf 10 หลายเดือนก่อน

    VERY nice video, thank you!
    Question: how have you configured your which-key to show Visual-Multi's menu when pressing m?

    • @ascourter
      @ascourter  10 หลายเดือนก่อน +1

      I believe that is out of the box behavior. Here is a link to my Neovim config to check out: github.com/exosyphon/nvim

    • @farzadmf
      @farzadmf 10 หลายเดือนก่อน

      Hmmm, interesting. I think my visual multi's setup is similar, but for some reason, I don't see the bindings in which-key.
      I thought it might because I'm lazy loading my plugins, but that doesn't seem to be reason.

  • @sumitsinghdeode2138
    @sumitsinghdeode2138 หลายเดือนก่อน

    This is great vidoe but I am using mac and C+down and C+Up make the iterm window to move hwo to fix it?

    • @ascourter
      @ascourter  หลายเดือนก่อน

      Thanks! If I understand what you are saying, it sounds like you want to use C+down / C+up but the iterm window is grabbing that keybinding? If so, check in your iterm settings for what your keybindings are. You might also check your System Settings and make sure those keybindings are not mapped there too.

  • @darkarie
    @darkarie 8 หลายเดือนก่อน

    I think a lot of these could be done with substitutions, right?

    • @ascourter
      @ascourter  8 หลายเดือนก่อน +1

      Yeah you can accomplish a lot with substitutions but some of these might be less mental overhead or fewer keystrokes.

    • @darkarie
      @darkarie 8 หลายเดือนก่อน

      yes, in any case the are a lot of over head that can be reduced in substitutions if you use brackets, /1 and regex patterns

    • @darkarie
      @darkarie 8 หลายเดือนก่อน

      of course you need to get used to it to be fast like everything in vim, but at the end it can be more powerful

  • @diaryofafounder
    @diaryofafounder 3 หลายเดือนก่อน

    Hey,
    I'm struggling to get vim-visual-multi installed in neovim.
    I've added this to my config:
    {
    'mg979/vim-visual-multi',
    branch = "master",
    lazy = false,
    init = function ()
    vim.g.VM_maps = {
    ["Find Under"] = ""
    }
    end,
    },
    But no luck (unable to run :help visual-multi)
    Do you have a video somewhere on how to setup vim-visual-multi in Nvim?

    • @ascourter
      @ascourter  3 หลายเดือนก่อน

      Sorry you're having trouble! I don't have a video explicitly installing and setting it up unfortunately. In my config I only have { "mg979/vim-visual-multi" },
      Maybe try that and see if it will install. github.com/exosyphon/nvim/blob/2c275382a2ead9d4e0e160e7251eb191f92cf28d/lua/exosyphon/lazy.lua#L860

    • @diaryofafounder
      @diaryofafounder 3 หลายเดือนก่อน

      @@ascourter no worries, thank you for sharing. Interesting that is the only line you have and it works for you! I'll have to see if anything else is conflicting.

  • @suhendrapembelajar
    @suhendrapembelajar 8 หลายเดือนก่อน

    how to change C-down to C-j in mac. because C-down is use as global key in mac to minimize/select mac windows.

    • @ascourter
      @ascourter  8 หลายเดือนก่อน

      I personally deactivated most of the global Mac keyboard shortcuts but you should be able to customize inside System Settings. As an alternative you could add a keyboard shortcut specifically for your terminal application.
      support.apple.com/guide/mac-help/change-a-conflicting-keyboard-shortcut-on-mac-mchlp2864/mac

  • @JamieAlban
    @JamieAlban 8 หลายเดือนก่อน

    that's a TINY keyboard

  • @husrevmustafalale2369
    @husrevmustafalale2369 17 วันที่ผ่านมา

    Am I the only one who cannot select a word using ctrl + n (I tried ctrl + N also)?

    • @ascourter
      @ascourter  17 วันที่ผ่านมา

      Check if you have any conflicts using lua require('telescope.builtin').keymaps