Why oil.nvim is the best directory plugin

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

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

  • @ascourter
    @ascourter  9 месяцев назад +4

    What plugin do you use for viewing / editing directories?

    • @gjermundification
      @gjermundification 9 месяцев назад

      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 9 месяцев назад +8

      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  9 месяцев назад +3

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

    • @majid_kargar
      @majid_kargar 9 месяцев назад

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

    • @mrkennedyfreak
      @mrkennedyfreak 9 месяцев назад +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 9 месяцев назад +23

    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  9 месяцев назад +10

      Use the tools that make you productive!

  • @impankratov
    @impankratov 9 месяцев назад +3

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

  • @russjr08
    @russjr08 9 месяцев назад +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 9 месяцев назад +3

    Missed this notification! Keep it up my dude!

  • @o-willian-fernandes
    @o-willian-fernandes 8 месяцев назад

    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!

  • @sutirk
    @sutirk 9 месяцев назад

    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  9 месяцев назад

      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!

  • @be_pie_today
    @be_pie_today 9 месяцев назад +3

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

  • @sdpolukhin
    @sdpolukhin 9 месяцев назад +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  9 месяцев назад

      Haha sorry for the mini heart attack

    • @r2com641
      @r2com641 8 месяцев назад

      why? whats wrong with that? i see no issues

  • @tamtonaquib
    @tamtonaquib 9 месяцев назад +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  8 месяцев назад

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

  • @comosaycomosah
    @comosaycomosah 6 месяцев назад

    sweet channel bro idk how ive just now found it!

    • @ascourter
      @ascourter  6 месяцев назад

      Thanks! And welcome!!

  • @oalfodr
    @oalfodr 9 месяцев назад +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  9 месяцев назад +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.

  • @DarthVader11912
    @DarthVader11912 5 месяцев назад

    I just use nvim-tree. I can configure the size, toggle hidden files and the keybindings are really simple.

  • @animegeek5448
    @animegeek5448 7 месяцев назад +2

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

    • @ascourter
      @ascourter  7 месяцев назад +1

      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.

  • @YasserMohammadElmorsy
    @YasserMohammadElmorsy 9 месяцев назад

    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  9 месяцев назад

      What do you like to use in the terminal?

  • @Subbeh2
    @Subbeh2 9 месяцев назад

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

    • @ascourter
      @ascourter  9 месяцев назад +1

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

  • @rodelias9378
    @rodelias9378 7 месяцев назад

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

  • @roiperelman223
    @roiperelman223 9 месяцев назад

    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  9 месяцев назад +1

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

    • @insanity0312
      @insanity0312 8 месяцев назад

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

  • @spasham74
    @spasham74 8 месяцев назад

    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  8 месяцев назад

      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.

  • @yakomisar
    @yakomisar 9 месяцев назад

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

    • @ascourter
      @ascourter  9 месяцев назад

      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.

  • @christofflinde
    @christofflinde 9 месяцев назад

    What a great video and channel discovery 🎉 very cool

    • @ascourter
      @ascourter  9 месяцев назад

      Thanks so much!

  • @channel-rk2pn
    @channel-rk2pn 9 месяцев назад

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

  • @WookENTP
    @WookENTP 9 месяцев назад +14

    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...

  • @VovaY
    @VovaY 9 месяцев назад +10

    mini.files is a similar plugin

    • @ascourter
      @ascourter  9 месяцев назад +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 9 месяцев назад +1

      I prefer oil.nvim

    • @macmanuelodumeru3708
      @macmanuelodumeru3708 9 месяцев назад +3

      I prefer mini.files. my go to file explorer

    • @ascourter
      @ascourter  9 месяцев назад +1

      @@macmanuelodumeru3708 what do you like about it?

    • @macmanuelodumeru3708
      @macmanuelodumeru3708 9 месяцев назад +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.

  • @TheMurinDeventa
    @TheMurinDeventa 9 месяцев назад

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

    • @ascourter
      @ascourter  9 месяцев назад

      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 9 месяцев назад

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

    • @BESHOIEMAD
      @BESHOIEMAD 9 месяцев назад

      @@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.

  • @RoroZoro-lf4nz
    @RoroZoro-lf4nz 8 месяцев назад

    It is possible to move multiple files at once ?

    • @ascourter
      @ascourter  8 месяцев назад

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

  • @SystemSculpt
    @SystemSculpt 9 месяцев назад

    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  9 месяцев назад

      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 9 месяцев назад

      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

  • @thedev7568
    @thedev7568 6 месяцев назад

    i am not getting highlight on my neotree

    • @ascourter
      @ascourter  6 месяцев назад

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

  • @mvargasmoran
    @mvargasmoran 9 месяцев назад

    so this is like Emacs dired-mode ?

    • @ascourter
      @ascourter  9 месяцев назад

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

    • @mvargasmoran
      @mvargasmoran 7 месяцев назад

      ​@@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

  • @radvilardian740
    @radvilardian740 9 месяцев назад

    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  9 месяцев назад

      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.

  • @Luclecool123
    @Luclecool123 7 месяцев назад +1

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

    • @ascourter
      @ascourter  7 месяцев назад

      TIL about VIFM

  • @1Lll_llllllLLLLllllll_llL1
    @1Lll_llllllLLLLllllll_llL1 8 месяцев назад

    have you tried using helix?

    • @ascourter
      @ascourter  8 месяцев назад

      I have not. Do you use helix?

    • @1Lll_llllllLLLLllllll_llL1
      @1Lll_llllllLLLLllllll_llL1 8 месяцев назад

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

  • @windowsrefund
    @windowsrefund 8 месяцев назад +1

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

    • @ascourter
      @ascourter  8 месяцев назад +1

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

    • @Markadown
      @Markadown 7 месяцев назад

      Sigh

    • @ascourter
      @ascourter  7 месяцев назад

      @@Markadown Why the sigh?

    • @Markadown
      @Markadown 7 месяцев назад

      @@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  7 месяцев назад +1

      @@Markadown thanks. I figure they knew too haha

  • @Lircking
    @Lircking 9 месяцев назад +1

    what

    • @ascourter
      @ascourter  9 месяцев назад +1

      I think you're missing some words