Multiline Editing in Neovim

Sdílet
Vložit
  • čas přidán 11. 07. 2024
  • In this video I walk through various ways to edit multiple lines of text in Neovim and vim.
    Multiline plugin: github.com/mg979/vim-visual-m...
    Companion Article: / multiline-editing-in-n...
    Join this channel to get access to perks:
    www.youtube.com/@ascourter/join
    Twitter: / exosyphon
    Website: andrewcourter.com
    Twitch: / exosyphon
    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-...
    0:00 Intro
    0:25 Macros
    1:17 Regex Replace
    1:38 Vim Visual Multi
    4:19 Outro
    #neovim #coding #programming
  • Věda a technologie

Komentáře • 49

  • @ascourter
    @ascourter  Před rokem +6

    Do you have other ways of editing multiple lines in Neovim or Vim? Share in the comments!

    • @Linuxdirk
      @Linuxdirk Před rokem +3

      Base Vim Visual Multi functionality can be done with built-in features. Just Ctrl+v and select your block, then Shift+i and edit whatever you like and then switch to normal mode again and it gets applied.

    • @ascourter
      @ascourter  Před rokem +1

      @@Linuxdirk Yes! Thank you for sharing this. This is also a good way to do multiline editing.

    • @Linuxdirk
      @Linuxdirk Před rokem +2

      @@ascourter Yep :) By far not as advanced as the plugin, but still …

    • @juanmacias5922
      @juanmacias5922 Před 10 měsíci

      @@Linuxdirk I was going to mention ctrl+v lol

  • @bolow
    @bolow Před rokem +1

    Please keep doing this, I loved and learned a lot from this video.

  • @dannythompson4453
    @dannythompson4453 Před rokem +2

    Cool stuff Andrew!

  • @ShadwTrooper
    @ShadwTrooper Před 2 měsíci +1

    That ^n trick is something I was sad to lose moving to nvim. I used it all the time in atom, sublime, vs code, and even intellij. I've been wondering if there was a plugin... then I found your channel. Thanks! My nvim got even better today.

  • @corejake
    @corejake Před rokem +6

    Ctrl+v gang checking in.

    • @ascourter
      @ascourter  Před rokem

      This is on my list to do a second multiline editing video on!

  • @oreonengine9444
    @oreonengine9444 Před rokem

    Awesome explanations! 👏

  • @user-dl3nm9jt5y
    @user-dl3nm9jt5y Před 10 měsíci

    Liked + Subscribed. Consice and to the point, keep going Andrew.

  • @brightonsikarskie8372

    Amazing, thank you

  • @Drezaem55
    @Drezaem55 Před rokem +8

    I just don't understand how you have so little subscribers with such great content. Perhaps it's just me, but it feels like there are enough beginner tutorials and these more advanced tutorials are harder to find.

    • @ascourter
      @ascourter  Před rokem +2

      Thanks! Yeah I have done some beginner stuff but want to share more on advanced usage where possible. Thanks for watching!

  • @iqbalrach
    @iqbalrach Před rokem

    Thx for the video, you're awesome 🎉

  • @_Esteban__
    @_Esteban__ Před 3 měsíci

    nice tutorial

  • @rutwikhiwalkar9583
    @rutwikhiwalkar9583 Před 8 měsíci

    Which font are you using for terminal? Looks very nice

    • @ascourter
      @ascourter  Před 8 měsíci

      Thanks! I'm using FiraCode Nerd Font. Here's a link to my kitty conf file:
      github.com/exosyphon/dotfiles/blob/main/kitty.conf

  • @TimurSevimli
    @TimurSevimli Před 11 měsíci

    Gruvbox

  • @lpanebr
    @lpanebr Před 6 měsíci

    How do you have one unique colored letter in each word per line? I need this! Please keep up the great content. Thanks.

    • @ascourter
      @ascourter  Před 6 měsíci +1

      Thanks! Check out this plugin:
      github.com/jinh0/eyeliner.nvim

    • @lpanebr
      @lpanebr Před 6 měsíci

      @ascourter I' m already using and loving it! Thanks!

  • @AScribblingTurtle
    @AScribblingTurtle Před rokem +1

    Very cool. Takes some getting used to, but very cool. Needed to change some remaps, because Alt+j/k does not work for MacOS.
    Just out of interest. What Plugin does the highlight of the different letters in your current line? (I know, the highlighted letters are for use with the f key in normal mode, but I don't know what plugin does that)

  • @tcurdt
    @tcurdt Před 10 měsíci

    A shame this needs a plugin. This should be included by default. Thanks for sharing.

  • @MrJonathandsouza
    @MrJonathandsouza Před 4 měsíci

    Holy useStates batman.

  • @gotmejerry
    @gotmejerry Před 6 měsíci

    Which programming language is this?

    • @ascourter
      @ascourter  Před 6 měsíci +1

      This is a NextJS app so it uses Typescript as the language and then has React components. In the bottom right you can see the filetype as "typescriptreact".

  • @Worldtruth099
    @Worldtruth099 Před 8 měsíci

    🧠

  • @edi_gun_awan
    @edi_gun_awan Před 3 měsíci

    The ctrl+n dont work for me.

    • @ascourter
      @ascourter  Před 3 měsíci

      Double check your keymaps with Telescope keymaps

  • @flop-oe5mr
    @flop-oe5mr Před 27 dny

    I am dumb but not so dumb as to install plugins for vim or neovim. I will just use visual block mode with Shift + i

  • @danialcole113
    @danialcole113 Před 11 měsíci

    "Promosm"

  • @allsunday1485
    @allsunday1485 Před 5 měsíci

    can you create multiple line cursors that are not aligned? Say I want to add something to three element classes but they're not vertically aligned. Can this plugin do it? Or are you limited to create new cursors going up and down?

    • @ascourter
      @ascourter  Před 5 měsíci

      They do not need to be aligned. If you hit C-n after highlighting the word then it will match the next one.

    • @allsunday1485
      @allsunday1485 Před 5 měsíci

      @@ascourter but what if i want arbitrary values? I believe vscode has a functionality where you can ctrl+click in arbitrary places to spawn multiple cursors

    • @ascourter
      @ascourter  Před 5 měsíci

      @@allsunday1485 I don't think that would be supported but you could double check the documentation on if you could Ctrl and click. Using the mouse would be the only way I could think of allowing arbitrary cursors but Neovim leans heavily into only keyboard shortcuts.

    • @allsunday1485
      @allsunday1485 Před 5 měsíci

      @@ascourter i most definitely don't want to use the mouse. I was thinking a key stroke to begin cursor marking mode, then another one for adding extra cursor at current position and finally leave cursor marking mode and edit however you see fit. That's what I had in mind

    • @ChrisCox-wv7oo
      @ChrisCox-wv7oo Před 2 měsíci

      @@allsunday1485 they have click to create a cursor functionality disabled by default. add the equivalent to your vim rc
      let g:VM_mouse_mappings = 1
      \\\ will start cursor mode in place, then ctrl click wherever
      edit : doesn't work for me, possibly some conflict with another plugin. just goes into visual block mode

  • @arttest0156
    @arttest0156 Před 4 měsíci

    I love regex