Neovim Power Tips: Volume 2

Поделиться
HTML-код
  • Опубликовано: 18 янв 2025

Комментарии • 51

  •  5 дней назад

    This channel is a gold mine for nvim/vim tips. It's so underrated. Keep up the good work lad.
    In the meantime, it might be a good idea enabling "Show Me The Key" software or equivalent during your presentations. Some of these tips are hard to grasp without rewinding the video a few times.

    • @benfrainuk
      @benfrainuk  5 дней назад +1

      Appreciate that. Yes. I did add the keys display in the latest one ruclips.net/video/kQp8rTysoCo/видео.htmlsi=8J2DADg43qMAUjLV 👍

  • @jotarokujo6099
    @jotarokujo6099 Год назад +5

    I was constantly annoyed by #2. Didn't know there was a difference in p and P in visual mode. Very helpful!

  • @m47h4r
    @m47h4r 4 месяца назад

    These two videos were really useful. Well done.

  • @robwells3713
    @robwells3713 Год назад +1

    Very helpful video. `norm` was a revelation!

  • @samcassidy2441
    @samcassidy2441 Год назад +1

    Love the tip on combining macros with the g command! My solution would have been to include navigating to the next instance of background (using /) as part of the macro, but this is a nice alternative that's potentially more flexible

  • @phaberest_
    @phaberest_ Год назад

    Good content! I'm still grasping quite a few

  • @mintcar
    @mintcar Год назад

    I think your theming and colours look really nice.

  • @visionary_3_d
    @visionary_3_d Год назад

    Love your videos. Keep up the good work 🔥

  • @tandlose
    @tandlose Год назад +3

    good video, would be nice with a thorough walkthrough of the command line in neovim. There are many videos explaining the basics of neovim with hjkl etc but few that explains the command line like norm etc

    • @benfrainuk
      @benfrainuk  Год назад +1

      That’s a good idea. Will try and do a video on that soon. 👍

  • @WillEhrendreich
    @WillEhrendreich Год назад

    Awesome stuff thanks!

  • @houelle
    @houelle Год назад +1

    how do you get that colorful animation on the line number when jumping at around ~ 2:40 ? thanks

    • @benfrainuk
      @benfrainuk  Год назад

      github.com/gen740/SmoothCursor.nvim 👍

  • @craigdanielmaceacher
    @craigdanielmaceacher Год назад +1

    using vim-unimpaired makes pasting above and below easier with [p and ]p plus it has other variants to indent as well as paste so you can do >]p

    • @benfrainuk
      @benfrainuk  Год назад

      I’ve actually taken to using mini-bracketed for this thanks to your suggestion. It’s a nice way to think about the above and below, thanks 🙏

  • @PragandSens
    @PragandSens Год назад +12

    thanks Hank from Breaking Bad

  • @aaronmcadam
    @aaronmcadam Год назад

    Thanks for this, really enjoyed it. And I think you're more of a Bruce Willis, personally 🤣

    • @benfrainuk
      @benfrainuk  Год назад +1

      Ha. I’ll take that. Yippee Ki-yay …

    • @sp3ctum
      @sp3ctum 11 месяцев назад

      @@benfrainuk a great username would be "Bruce Vimis". Okay, maybe not that great. 😄

  • @dbsmith3974
    @dbsmith3974 Год назад

    I was looking for the function that you added to telescope... is it in your blog?

    • @benfrainuk
      @benfrainuk  Год назад +1

      Sorry! Just added the links to the description 👍

  • @gennarotedesco7973
    @gennarotedesco7973 Год назад

    Hi Ben, great video! If I understand correctly, you are using delta as vimdiff within the gitsign plugin? Could you expand on how you configured it (I am using delta as well but as far as I know there is no way to use it as drop-in replacement for the in-built vimdiff, but I hope I am wrong :) )?

    • @benfrainuk
      @benfrainuk  Год назад

      The command I typically run is ‘:Gitsigns diffthis ~1’ that gives me a diff with solid background colours. There is supposed to be a way of getting it setup with Telescope too but it looked too convoluted for me to bother!
      Actually, now I look at my config, I’m not even sure Gitsigns is actually using delta! I think I only actually have delta working inside Lazygit. The fact that git signs shows me solid colours as opposed to the +/- that Telescope uses made me think it was using git-delta but now I am not sure!

    • @gennarotedesco7973
      @gennarotedesco7973 Год назад

      yes, however gitsigns uses the inbuilt vimdiff to show the differences, it does not take as option an external diff program (like delta), does it?

  • @sudqi
    @sudqi Год назад

    For deleting everything after commad instead of "df," you can do "dt," it will delete till the comma

    • @benfrainuk
      @benfrainuk  Год назад

      But I want to delete everything AFTER the comma, not before. So I don’t think ‘dt,’ would help would it? Have I misunderstood?
      Another option that would do it though would be to work from the other end, so ‘norm $dF,x’ so we go to the end of the line, then delete back to the comma, then x to remove the character under the cursor

    • @sudqi
      @sudqi Год назад

      ​@@benfrainuk I've misunderstood you sorry.
      I honestly use the substitute way more frequent .

    • @sibouras792
      @sibouras792 Год назад

      this is late but you could just move the cursor with l, so `dt,l`

  • @pilkers745
    @pilkers745 Год назад

    hey ben! do you use tmux as well by chance??

    • @benfrainuk
      @benfrainuk  Год назад +1

      I don’t. I find Kitty is enough for my needs.

  • @brandondapro
    @brandondapro Год назад

    Have you switched from sublime to nvim?

  • @pwnwriter
    @pwnwriter Год назад +1

    map j -> jzz
    k -> kzz

  • @gplusplus314
    @gplusplus314 Год назад

    Thanks for another great video! Hey just FYI, your audio has a lot of unintended bass. It’s making my subwoofers shake the house, usually whenever you type. Think “Jurassic Park” when the cup of water is rippling each time the T-Rex 🦖 takes a step.
    Solution: do a low-cut (or high pass) at 120 hz or higher. Pretty much any video or audio editing tool can do this. 😉

    • @benfrainuk
      @benfrainuk  Год назад +1

      Thanks, I’ll take a look for the next one. I was told by someone into audio that at the end of my edit to slap a compressor filter onto the audio. That definitely boosts everything but maybe at the expense of being too much! Will try the next one without that.

    • @gplusplus314
      @gplusplus314 Год назад

      @@benfrainuk The compression sounds good! You just need to do a low-cut *after* the compressor. So basically just chop out anything below 120 hz or so. Play with that number until you’re happy with the result, basically. Some compressors have a built-in way of doing this, but the mental model should be “compress first, then cut out the bad frequencies after.”
      “Shake the house” bass starts at about 80 hz, to give you an idea. “Shake the entire Earth” happens at 30 hz or so, which is a hell of a surprise when waking up with my morning coffee. Haha!
      🦖 ☕️

    • @benfrainuk
      @benfrainuk  Год назад +1

      @@gplusplus314 ok great 🤣 sorry about that, I’ll give the low cut a go next time 👍

    • @benfrainuk
      @benfrainuk  Год назад +1

      Tried your suggestion on the audio for my latest review (Glove 80). If you get chance to take a look/listen, let me know if that’s an improvement. Thanks again. 👍

    • @gplusplus314
      @gplusplus314 Год назад

      @@benfrainuk Yes sir! Sounds great! I’ll miss the house rattles, but the quality content is a worthwhile tradeoff. 🤣

  • @mzerone-g6m
    @mzerone-g6m Год назад

    Emacs where emacs

  • @imaksimus
    @imaksimus Год назад +1

    Thanks for the video, it’s great.
    To copy unequal string you could also do :%!awk '{print $3}'

    • @benfrainuk
      @benfrainuk  Год назад +1

      Cool! Will have a look at that and try and understand. Have had a tab open ‘Understanding Awk’ for about 4 years I still haven’t read 🤣

    • @imaksimus
      @imaksimus Год назад

      @@benfrainuk this is similar to the ripgrep example you show later in the video. Essentially it is a filter which prints the third column of each row.

    • @benfrainuk
      @benfrainuk  Год назад

      @@imaksimus oooh, that’s really cool. Thanks, I am reading that article right now 👍👍

    • @imaksimus
      @imaksimus Год назад

      @@benfrainuk one more thing from me and I’ll shut up 😅
      To delete everything after a comma, the following replace command would work too:
      :%s/,\zs.*/

    • @benfrainuk
      @benfrainuk  Год назад

      @@imaksimus I’ll happily take everything you’ve got 👍