Why oil.nvim is the best directory plugin

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 มิ.ย. 2024
  • In this video I go over why I started using oil.nvim over NetRW and why I prefer it to using Neotree or other tree file viewers.
    Companion Article: / why-i-switched-from-ne...
    My Neovim config: github.com/exosyphon/nvim
    Why splits vs drawers: vimcasts.org/blog/2013/01/oil-...
    Join the channel to get access to perks:
    / @ascourter
    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
    Music : Way Home by Tokyo Music Walker
    Stream & Download : fanlink.to/tmw_way_home
    Creative Commons - Attribution 3.0 Unported - CC BY 3.0
    ⏰ Timestamps
    0:00 Intro
    0:50 NetRW Overview
    2:12 Oil.nvim config
    8:56 Outro
    #neovim #coding #vim
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    What plugin do you use for viewing / editing directories?

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

      I use the linux command line interface, in nvim I use telescope. I tried to acquire a taste for nerdtree some years back, I must admit I like the fact that you can type `path/file.ext` and path will be made, then again mkdir and touch/ echo -n "" > path/file.ext also do work well.

    • @ShawnPMurphy8
      @ShawnPMurphy8 2 หลายเดือนก่อน +7

      mini.files for me. I converted from oil to mini.files a couple months ago. It gives you everything oil does but the navigation to me is way easier. Uses concept of Ranger where you move in and out / up and down file structure with hjkl. Hard to explain. But as soon as I used it I fell in love!

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

      @@ShawnPMurphy8 nice! I'll check it out. Thanks for sharing!

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

      I've been using netrw since I started using nvim. I will definitely checkout oil.nvim though

    • @mrkennedyfreak
      @mrkennedyfreak 2 หลายเดือนก่อน +1

      I'm a fan of NeoTree. I tried Oil so many times and just can't get the hype. Its great for creating multiple files / directories really quickly, but I just flat can't use it to navigate my projects.

  • @aquepaique
    @aquepaique 2 หลายเดือนก่อน +20

    I constantly work on projects that I barely know, so I need to see the hierarchy of the project in a buffer, that's why I keep with nvim-tree.

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

      Use the tools that make you productive!

  • @russjr08
    @russjr08 2 หลายเดือนก่อน +1

    I had seen Oil before, but didn't quite understand the power of it until seeing your video - just set it up now, thanks!

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

    Missed this notification! Keep it up my dude!

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

      Thanks Cody!

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

    7:26 whoa, should've start the video with this one! Now I definitely have to try out this plugin)

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

    I have it installed, but I use it sparingly. I will force myself to do it this week as it seems to increase productivity when we are dealing with FS, which happens all the time :)
    Thanks for the video!

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

    What a great video and channel discovery 🎉 very cool

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

      Thanks so much!

  • @comosaycomosah
    @comosaycomosah 6 วันที่ผ่านมา

    sweet channel bro idk how ive just now found it!

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

      Thanks! And welcome!!

  • @be_pie_today
    @be_pie_today 2 หลายเดือนก่อน +3

    I'm using oil.nvim too but sometimes I miss ranger integration plugin I used to use

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

    Great video once again. I have been using LazyVim distro with NeoTree plugin and it has been a pain to move files from 5folders deep to 5folders deep. Your video popped up just in time. I will configure my own lazy and use oil in there.
    On a different note, do you know any downside of having both NeoTree and oil in the same lazy config?

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

      Thank you! The downside would be having two plugins to do something similar. So the added burden of maintaining both. But they are loaded at different times so I don't believe any keymaps would overlap and wouldn't impact one another unless you did something weird.

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

    Would love to see a video about how you set up you Mac.

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

      Anything in particular? Something like what programs, terminal config, and keymaps?

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

    I too have been trying netrw for a while, you can move files around using m commands
    mt to mark the target dir, mf to mark the files, and mm/mc to make the move/copy the file(s).
    It works.... Sometimes. It mostly works well when moving files into subdirectories of the current directory, if you try anything fancier it probably will give you an error because either the target or the file isn't currently in your screen. I still haven't really figured that out.
    Needless to say, im gonna adopt oil.nvim now, i feel like i already know enough about netrw to work my way on a server or default vim install

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

      Yes! I had a very similar experience with NetRW and moving files. It would work fine sometimes but just wouldn't sometimes. Thanks for sharing and I hope you have fun with oil.nvim!

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

    Cool🎉. How do you move around your kitty window without borders?

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

      I use tmux so I create new panes and move around using Ctrl and h,j,k,l. Check out my tmux video if you want a more in depth answer. I do plan on doing another tmux video soon too.

  • @sdpolukhin
    @sdpolukhin 2 หลายเดือนก่อน +1

    "What is up my ne" out of the get go made me physically flinch before I heard the rest of the word🤣

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

      Haha sorry for the mini heart attack

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

      why? whats wrong with that? i see no issues

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

    I just open vifm from nvim in a terminal and can get all of these features plus nice previews and a complete file manager.

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

      What do you like to use in the terminal?

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

    In neovim v0.10, we can gx without the gx.nvim plugin since that keybind is detached from netrw to vim.ui.open(). (v0.10 is about to be released at the end of april 2024 i believe)
    Also I'm the 420th like for this video (nice)

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

      Nice! Thanks for sharing. I'll update and check it out at the end of this month!

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

    I'm trying to stop using neo-tree and use just oil.nvim
    Thanks a lot for such a great video.

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

      Thank you!!

  • @oalfodr
    @oalfodr 2 หลายเดือนก่อน +1

    Why would you have opt object empty and later make a config function entry? Isn't it better just to make opt with default file explorer entry and skip defining config function?

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

      Great question. Typically the config function has a default implementation that uses what is passed into opt so a lot of times you can simply add your configuration into opt. I didn't dive into the config function for oil.nvim and grabbed what was in their docs for using "require()". It's likely that this could be changed to move that lua table to opt but not something to split hairs on in my experience.

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

    1 feature they are missing is git integration. At minimum to see if we made changes to the project we are in (branch name would also be nice. If I do go out and see many folder that have git, I would like to see if changes were made as well

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

      Do you know if this is on the roadmap or has been requested?

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

      @@ascourter 'refractalize/oil-git-status.nvim' :)

  • @RoroZoro-lf4nz
    @RoroZoro-lf4nz หลายเดือนก่อน

    It is possible to move multiple files at once ?

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

      Yes, if you deleted multiple files and moved them in a different directory and pasted them you would see multiple moves.

  • @VovaY
    @VovaY 2 หลายเดือนก่อน +9

    mini.files is a similar plugin

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

      I think that one is referenced on the oil.nvim README even. I'll have to do a comparison video at some point. Do you use mini.files?

    • @lmnts556
      @lmnts556 2 หลายเดือนก่อน +1

      I prefer oil.nvim

    • @macmanuelodumeru3708
      @macmanuelodumeru3708 2 หลายเดือนก่อน +3

      I prefer mini.files. my go to file explorer

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

      @@macmanuelodumeru3708 what do you like about it?

    • @macmanuelodumeru3708
      @macmanuelodumeru3708 2 หลายเดือนก่อน +3

      @@ascourter For me, apart from the fact that I could edit files and folders like normal buffers much like oil, I love that I have a preview of the files I'm selecting without having to actually open them to see what's inside. Or having to press a particular button just to see a preview (cuz I won't remember to, I'll just open the file).
      Then I like that my window doesn't change when I open it, I could open it, peak at some other files with the preview and quit it without it feeling as though I was switching too much context. Not sure if I explained it correctly though. But that's just how I like to work.

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

    Why does oil.nvim not have a tree view like neotree?

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

      I can't remember if this is on the documentation page, but I'd imagine rendering a view like that in a buffer and then checking diffs to execute file commands would be very difficult to implement.

  • @channel-rk2pn
    @channel-rk2pn 2 หลายเดือนก่อน

    when I have to do multiple renames oil.nvim is a lifesaver. it’s just buffer and you can do search and replace

    • @channel-rk2pn
      @channel-rk2pn 2 หลายเดือนก่อน

      great video btw!

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

      Yes! So easy with oil.nvim

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

      Thanks!

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

    I don't get it, this looks like a worse ranger / lf with no vim keybinds, seems like you've gotta learn a whole bunch of new keybinds for things. Have you tried ranger / lf? If so, how is this better? Regardless, great video - very entertaining to watch :)

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

      Thanks! I haven't used Ranger but it's been mentioned a few times so it's on my list to dig deeper into. The benefit is editing files in a buffer but I'm not sure what the difference is between that and Ranger. Mini files is another that I'm going to dig into as well. More videos to come!

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

      I love oil as a tool for fast edits on bunch of file names. It is not a replacement for file managers like lf but lf cannot edit hundreds of files at once in a vim buffer and this shines at that

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

    so this is like Emacs dired-mode ?

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

      I am not familiar with that so maybe you can tell me 😄

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

      ​@@ascourter in emacs you could always go into DIRED mode that's Directory Edit, it looks like doing ls-al, and you edit the file explorer thingy as if it is text in the buffer then on save, it will ask you if you are sure to modify all of that in the filesystem.
      I mostly used to use it for modifying the drwxr-xr-x permissions and bulk IMAGE-0001.jpg to /2023/06/lake-vacations/pictures.jpg with a Macro.
      Gonna check if Oil.nvim does all that stuff, it will be great to have that back on my feature bag.
      I miss Emacs

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

    I thought gx command is now builtin in neovim without netrw. I remove my custom gx keymap and it still works

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

      I believe Neovim makes a call to NetRW for gx so unless you disable that or replace the call (which oil.nvim does) then it works. Definitely check me on this if you find anything in the docs!

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

      @@ascourter Actually I'm using nvim 0.10 and it does integrate into native neovim without netrw, it using vim.ui.open()

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

      @@ascourter , i set the default_file_explorer = false in config and it works without additional gx plugin. Thanks for this video btw this plugin is great but i hope if i can see the whole directory folders and files instead of only parent folder.

  • @thedev7568
    @thedev7568 4 วันที่ผ่านมา

    i am not getting highlight on my neotree

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

      Double check you have the right config. Here's what mine looks like: github.com/exosyphon/nvim/blob/b2176f3eee73f9c384cc8835725353fbd8fd002a/lua/plugins.lua#L24

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

    I love this plugin, but Im not gonna use it to move files, not if i dont have git setup. I have multiple cases where my files just gone outta nowhere after dd onto it, luckily i had git setup and those files are staged already so I can revert back. I ll just use neotree for this kinda unsafe operations, I hv both btw, they are pretty neat together

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

      That's a good call out. It is easy to remove files and lose them. I am almost always in a git repo so I use that as my safety net as well.

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

    have you tried using helix?

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

      I have not. Do you use helix?

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

      yeah, it doesn't have a file tree just a file picker it does bother me sometime and still trying to adapt with it

  • @Luclecool123
    @Luclecool123 25 วันที่ผ่านมา +1

    VIFM has been existing in the dark for decades...

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

      TIL about VIFM

  • @WookENTP
    @WookENTP 2 หลายเดือนก่อน +9

    Most of neotree key bindings are the same as you would expect (d to delete, r to rename, etc), I don't see much value in being spartan UI-wise... Like... You passed the learning curve of vim, you'll probably be able to tweak your muscle memory just fine for your file tree needs...

  • @Lircking
    @Lircking 2 หลายเดือนก่อน +1

    what

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

      I think you're missing some words

  • @windowsrefund
    @windowsrefund 2 หลายเดือนก่อน +1

    Oil is great. Btw, there is no such thing as a "folder".

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

      "directory" would be a better word. I think you get what I meant though.

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

      Sigh

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

      @@Markadown Why the sigh?

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

      @@ascourter it was for the folder comment you responded to. Stuff like that irritates me. 😅 They knew what you meant. You even said “directory” shortly after.

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

      @@Markadown thanks. I figure they knew too haha