Why oil.nvim is the best directory plugin

Ғылым және технология

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
    @ascourter2 ай бұрын

    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 ай бұрын

    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 ай бұрын

    @@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 ай бұрын

    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
    @aquepaique2 ай бұрын

    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 ай бұрын

    Use the tools that make you productive!

  • @russjr08
    @russjr082 ай бұрын

    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_youtube2 ай бұрын

    Missed this notification! Keep it up my dude!

  • @ascourter

    @ascourter

    2 ай бұрын

    Thanks Cody!

  • @impankratov
    @impankratov2 ай бұрын

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

  • @willianf
    @willianf2 ай бұрын

    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
    @christofflinde2 ай бұрын

    What a great video and channel discovery 🎉 very cool

  • @ascourter

    @ascourter

    2 ай бұрын

    Thanks so much!

  • @comosaycomosah
    @comosaycomosah6 күн бұрын

    sweet channel bro idk how ive just now found it!

  • @ascourter

    @ascourter

    6 күн бұрын

    Thanks! And welcome!!

  • @be_pie_today
    @be_pie_today2 ай бұрын

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

  • @spasham74
    @spasham742 ай бұрын

    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
    @Subbeh22 ай бұрын

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

  • @ascourter

    @ascourter

    2 ай бұрын

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

  • @sutirk
    @sutirk2 ай бұрын

    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
    @yakomisar2 ай бұрын

    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
    @sdpolukhin2 ай бұрын

    "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
    @YasserMohammadElmorsy2 ай бұрын

    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
    @tamtonaquib2 ай бұрын

    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
    @oalfodr2 ай бұрын

    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 ай бұрын

    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
    @roiperelman2232 ай бұрын

    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 ай бұрын

    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
    @VovaY2 ай бұрын

    mini.files is a similar plugin

  • @ascourter

    @ascourter

    2 ай бұрын

    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 ай бұрын

    I prefer oil.nvim

  • @macmanuelodumeru3708

    @macmanuelodumeru3708

    2 ай бұрын

    I prefer mini.files. my go to file explorer

  • @ascourter

    @ascourter

    2 ай бұрын

    @@macmanuelodumeru3708 what do you like about it?

  • @macmanuelodumeru3708

    @macmanuelodumeru3708

    2 ай бұрын

    @@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Ай бұрын

    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-rk2pn2 ай бұрын

    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 ай бұрын

    Yes! So easy with oil.nvim

  • @ascourter

    @ascourter

    2 ай бұрын

    Thanks!

  • @SystemSculpt
    @SystemSculpt2 ай бұрын

    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
    @mvargasmoran2 ай бұрын

    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
    @TheMurinDeventa2 ай бұрын

    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
    @thedev75684 күн бұрын

    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
    @radvilardian7402 ай бұрын

    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
    @Luclecool12325 күн бұрын

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

  • @ascourter

    @ascourter

    25 күн бұрын

    TIL about VIFM

  • @WookENTP
    @WookENTP2 ай бұрын

    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
    @Lircking2 ай бұрын

    what

  • @ascourter

    @ascourter

    2 ай бұрын

    I think you're missing some words

  • @windowsrefund
    @windowsrefund2 ай бұрын

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

  • @ascourter

    @ascourter

    2 ай бұрын

    "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

    Ай бұрын

    @@Markadown thanks. I figure they knew too haha

Келесі