The Best Oil.nvim Configuration

Sdílet
Vložit
  • čas přidán 2. 08. 2024
  • In this video I go over some updates I have made to my oil.nvim configuration that I think take it to the next level.
    Companion Article: / the-best-oil-nvim-conf...
    My Neovim Config: github.com/exosyphon/nvim
    Join the channel to get access to perks:
    / @ascourter
    Ask me a question!
    andrewcourter.com/services
    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-...
    Free Stock Footage by videezy.com/
    🎵 Music
    Karl Casey @ White Bat Audio
    • Chill Synth / Synthwav...
    ⏰ Timestamps
    0:00 Intro
    0:18 Oil.nvim recap
    2:02 Config Updates
    5:59 File editing Trick
    7:03 Outro
    #neovim #coding #softwareengineer
  • Věda a technologie

Komentáře • 60

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

    What other config do you use with Oil.nvim?

  • @aquepaique
    @aquepaique Před měsícem +7

    I like using floating window oil, because you can see the file path in the float window title, so helpful.

    • @ascourter
      @ascourter  Před měsícem

      Oh nice! I'll have to give this a try.

    • @ascourter
      @ascourter  Před měsícem

      Do you have any config got the float window too or do you use the defaults?

    • @vladanisov1689
      @vladanisov1689 Před měsícem +1

      @@ascourter I have this:
      float = {
      padding = 5
      }
      and then when you call the Oil command you just pass in the float flag like so :Oil --float

  • @raenastra
    @raenastra Před měsícem +10

    the natural_order option affects files with numbers. rather than sorting numbers alphabetically, it sorts them numerically. for example, file9.txt and file10.txt will be sorted treating 9 less than 10 (rather than the string "9" being greater than "1")

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

      Ah that makes a lot more sense. Thanks for digging into that and sharing!

  • @lingtoone3719
    @lingtoone3719 Před měsícem +1

    Thanks for doing this video. Recently struggling with neovim

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

      You're welcome! Glad I helped. Let me know if there's something I can cover to help ya!

  • @naranyala_dev
    @naranyala_dev Před měsícem

    definitely worth to try, thank you

  • @Majiy00
    @Majiy00 Před měsícem

    Great video, love oil.nvim!!!

    • @ascourter
      @ascourter  Před měsícem

      Thanks! I definitely love it as well

  • @prashlovessamosa
    @prashlovessamosa Před měsícem

    Thanks for sharing.

  • @rodelias9378
    @rodelias9378 Před měsícem

    Thank you!!

  • @MohammadLsk
    @MohammadLsk Před měsícem

    Awesome. Thanks

  • @KevinNitro
    @KevinNitro Před měsícem +1

    I think natural sort like you have files ["1.txt", "5.txt", "10.txt", "11.txt", "40.txt"]
    Without it (false), it will sort to 1, 10, 11, 40, 5. Because it will compare the each first character
    With the natural sorting, it will sort like what we expect it to be.

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

      I definitely like that better. Thanks for sharing!

  • @vulbyte
    @vulbyte Před měsícem

    solid clean video, i just wanna add you should totally do a vim tips video because that ^v into g, ^A felt like a fighting game combo and i will 100% be doing that just because how it feels

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

      Haha I will definitely put that into another tips video

  • @MohammadLsk
    @MohammadLsk Před měsícem

    Also, pressing 'g' followed by a backslash to toggle trash is handy

    • @ascourter
      @ascourter  Před měsícem

      Yeah that is quite handy! Thanks for mentioning that.

  • @linkarzu
    @linkarzu Před měsícem

    Wonderful video, thank you very much, now I don’t have to figure all of this out from scratch.
    I have a question, do you use neo-tree.nvim, or completely rely on oil.nvim? I’m used to neo-tree (I know, the vim overlords will come after me) but I don’t like how it renames and moves files around.
    So wondering if completely replace it or use both.

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

      Thanks! Glad I could help. Haha the vim overlords are definitely going to come knocking... :D I personally rely solely on oil.nvim but when I am working with others I will have neo-tree.nvim open so they can see more easily where we are in the file system. Here's a link to the config I use: github.com/exosyphon/nvim/blob/525694635d0b16f7d461f516b5c8b1a95381c861/lua/plugins.lua#L11

    • @linkarzu
      @linkarzu Před měsícem

      @@ascourter appreciate the response. Will try to use oil exclusively, at least for a month, and see how it feels.

  •  Před měsícem +1

    Open with “:Oil -float” in a cool floating window

    • @ascourter
      @ascourter  Před měsícem

      Love it. Did you customize the window at all?

    •  Před měsícem

      @@ascourter yes, there is a float-option (same level as view-options):
      float = {
      -- Padding around the floating window
      padding = 2,
      max_width = 90,
      max_height = 0,
      -- border = "rounded",
      win_options = {
      winblend = 0,
      },

  • @cody_codes_youtube
    @cody_codes_youtube Před měsícem +3

    FAST CODY NOTIFICATION SQUAD

  • @user-xd5gd4pc9h
    @user-xd5gd4pc9h Před měsícem

    Coooool config. IMO, lots of navigator user map ctrl+h/j/l/m to move to pane in neovim and tmux. It conflicts with oil buffer keymaps. Do you know how to remap these keys in oil buffer? Thanks a lot!

    • @ascourter
      @ascourter  Před měsícem

      I think there might be a bug in Oil.nvim to be able to remap them. But here's an example to at least disable them.
      keymaps = {
      [""] = false,
      [""] = false,
      [""] = false,
      ["q"] = "actions.close",
      },

    • @user-xd5gd4pc9h
      @user-xd5gd4pc9h Před měsícem

      @@ascourter coool thank you! and oil.nvim cannot change in lazyvim using `keys = `.

  • @MohammadLsk
    @MohammadLsk Před 8 dny

    Hi, is there any way to use telescope to open the file explorer (oil) in a directory? I mean navigating using both telescope and oil. Also, do you have a discord channel or some social group where I can ask questions?

    • @MohammadLsk
      @MohammadLsk Před 8 dny

      i set up this
      vim.keymap.set('n', '-', "Telescope fd find_command=fd,-t=d ")

    • @ascourter
      @ascourter  Před 8 dny

      @@MohammadLsk good question. I don't know of a way to combine telescope and oil. I'd guess you could create a telescope extension that uses oil.
      I don't have a discord yet. It's something I should create soon. You might join Josh Medeski's discord for now: discord.com/invite/qQEARWhZ

    • @MohammadLsk
      @MohammadLsk Před 8 dny

      @@ascourter I appreciate your response. Your content and guidance have been super helpful. I've set up this key mapping for now:
      vim.keymap.set('n', '-', "Telescope fd find_command=fd,-t=d ")

  • @kalanzi1000
    @kalanzi1000 Před měsícem

    Can you please show us how one can get to see images like jpegs, pngs in neovim using maybe something like telescope

    • @ascourter
      @ascourter  Před měsícem

      I'll bring this to the top of my list and see what's possible

    • @kalanzi1000
      @kalanzi1000 Před měsícem

      @@ascourter thank you so much,can't wait

  • @damilolaowolabi9148
    @damilolaowolabi9148 Před měsícem

    Can you show us your tmux settings and theme?

    • @ascourter
      @ascourter  Před měsícem

      I sure can! I have a video from awhile ago on setting up tmux but I really need to create an updated one with my latest theme and such. Thanks for requesting this!

    • @ascourter
      @ascourter  Před měsícem

      Here also is a link to my tmux config github.com/exosyphon/dotfiles/blob/5d6e87a583ff1ac9d244daed26d379627cd04592/.tmux.conf#L1

  • @Salloom99
    @Salloom99 Před měsícem

    If you're annoyed by the extra space at the top of the dashboard page you can reduce some spaces in the line 122
    logo = string.rep("
    ", 8) .. logo .. "

    "
    this one --^
    I figured out this earlier and thought of sharing it.
    thx for the vid btw, cant wait for the next one ❤

    • @ascourter
      @ascourter  Před měsícem

      Nice! Thanks for sharing this. Do you put this in the config function or somewhere else?

  • @ertwro
    @ertwro Před 23 dny

    I’ve been using mini.files (more and more of the mini plugins, really), which I find less visually annoying.

    • @ascourter
      @ascourter  Před 23 dny

      It is on my list to check out all the mini nvim plugins. Seems like they are growing in popularity and have a lot of great features. Let me know if you think I should focus on a specific one first.

  • @theIbraDev
    @theIbraDev Před měsícem

    I still use netrw for browsing, and i use the oil modal when i need to edit files. It's 10000x better than netrw for that.

  • @joaomendoncayt
    @joaomendoncayt Před 24 dny

    you don't need gx plugins with neovim@^0.10.0

    • @ascourter
      @ascourter  Před 24 dny +1

      @@joaomendoncayt thanks, I'll try removing it and verify nothing breaks

    • @ascourter
      @ascourter  Před 24 dny +1

      Confirmed! I was able to remove gx.nvim and nothing broke with opening links. Thanks for probing me on this!

    • @joaomendoncayt
      @joaomendoncayt Před 23 dny

      @@ascourter Thank you for the video! Cheers.

  • @hanamichi-sakuragi
    @hanamichi-sakuragi Před 23 dny

    Any plans to add a flake.nix?

    • @ascourter
      @ascourter  Před 23 dny

      Haha I'll need to get up to speed on Nix first. Definitely on my list!

  • @RogasTV
    @RogasTV Před měsícem +2

    mini.files

    • @ascourter
      @ascourter  Před měsícem

      This is on my list to try soon!