Why oil.nvim is the best directory plugin

  Рет қаралды 18,943

Andrew Courter

Andrew Courter

Күн бұрын

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

Пікірлер: 79
@ascourter
@ascourter Ай бұрын
What plugin do you use for viewing / editing directories?
@gjermundification
@gjermundification Ай бұрын
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 Ай бұрын
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 Ай бұрын
@@ShawnPMurphy8 nice! I'll check it out. Thanks for sharing!
@fulcain8596
@fulcain8596 Ай бұрын
I've been using netrw since I started using nvim. I will definitely checkout oil.nvim though
@mrkennedyfreak
@mrkennedyfreak Ай бұрын
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 Ай бұрын
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 Ай бұрын
Use the tools that make you productive!
@russjr08
@russjr08 Ай бұрын
I had seen Oil before, but didn't quite understand the power of it until seeing your video - just set it up now, thanks!
@impankratov
@impankratov Ай бұрын
7:26 whoa, should've start the video with this one! Now I definitely have to try out this plugin)
@cody_codes_youtube
@cody_codes_youtube Ай бұрын
Missed this notification! Keep it up my dude!
@ascourter
@ascourter Ай бұрын
Thanks Cody!
@willianf
@willianf Ай бұрын
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 Ай бұрын
What a great video and channel discovery 🎉 very cool
@ascourter
@ascourter Ай бұрын
Thanks so much!
@be_pie_today
@be_pie_today Ай бұрын
I'm using oil.nvim too but sometimes I miss ranger integration plugin I used to use
@spasham74
@spasham74 Ай бұрын
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 Ай бұрын
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.
@tamtonaquib
@tamtonaquib Ай бұрын
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 Ай бұрын
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!!
@sutirk
@sutirk Ай бұрын
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 Ай бұрын
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!
@sdpolukhin
@sdpolukhin Ай бұрын
"What is up my ne" out of the get go made me physically flinch before I heard the rest of the word🤣
@ascourter
@ascourter Ай бұрын
Haha sorry for the mini heart attack
@r2com641
@r2com641 Ай бұрын
why? whats wrong with that? i see no issues
@Subbeh2
@Subbeh2 Ай бұрын
Would love to see a video about how you set up you Mac.
@ascourter
@ascourter Ай бұрын
Anything in particular? Something like what programs, terminal config, and keymaps?
@oalfodr
@oalfodr Ай бұрын
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 Ай бұрын
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.
@yakomisar
@yakomisar Ай бұрын
Cool🎉. How do you move around your kitty window without borders?
@ascourter
@ascourter Ай бұрын
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.
@roiperelman223
@roiperelman223 Ай бұрын
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 Ай бұрын
Do you know if this is on the roadmap or has been requested?
@joaomendoncayt
@joaomendoncayt 26 күн бұрын
@@ascourter 'refractalize/oil-git-status.nvim' :)
@YasserMohammadElmorsy
@YasserMohammadElmorsy Ай бұрын
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 Ай бұрын
What do you like to use in the terminal?
@RoroZoro-lf4nz
@RoroZoro-lf4nz 23 күн бұрын
It is possible to move multiple files at once ?
@ascourter
@ascourter 23 күн бұрын
Yes, if you deleted multiple files and moved them in a different directory and pasted them you would see multiple moves.
@channel-rk2pn
@channel-rk2pn Ай бұрын
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 Ай бұрын
great video btw!
@ascourter
@ascourter Ай бұрын
Yes! So easy with oil.nvim
@ascourter
@ascourter Ай бұрын
Thanks!
@SystemSculpt
@SystemSculpt Ай бұрын
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 Ай бұрын
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 Ай бұрын
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
@WookENTP
@WookENTP Ай бұрын
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...
@TheMurinDeventa
@TheMurinDeventa Ай бұрын
I thought gx command is now builtin in neovim without netrw. I remove my custom gx keymap and it still works
@ascourter
@ascourter Ай бұрын
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 Ай бұрын
@@ascourter Actually I'm using nvim 0.10 and it does integrate into native neovim without netrw, it using vim.ui.open()
@BESHOIEMAD
@BESHOIEMAD Ай бұрын
@@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.
@VovaY
@VovaY Ай бұрын
mini.files is a similar plugin
@ascourter
@ascourter Ай бұрын
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 Ай бұрын
I prefer oil.nvim
@macmanuelodumeru3708
@macmanuelodumeru3708 Ай бұрын
I prefer mini.files. my go to file explorer
@ascourter
@ascourter Ай бұрын
@@macmanuelodumeru3708 what do you like about it?
@macmanuelodumeru3708
@macmanuelodumeru3708 Ай бұрын
@@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.
@mvargasmoran
@mvargasmoran Ай бұрын
so this is like Emacs dired-mode ?
@ascourter
@ascourter Ай бұрын
I am not familiar with that so maybe you can tell me 😄
@mvargasmoran
@mvargasmoran 2 күн бұрын
​@@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
@gagongtarantado
@gagongtarantado 25 күн бұрын
have you tried using helix?
@ascourter
@ascourter 25 күн бұрын
I have not. Do you use helix?
@gagongtarantado
@gagongtarantado 25 күн бұрын
yeah, it doesn't have a file tree just a file picker it does bother me sometime and still trying to adapt with it
@radvilardian740
@radvilardian740 Ай бұрын
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 Ай бұрын
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.
@Lircking
@Lircking Ай бұрын
what
@ascourter
@ascourter Ай бұрын
I think you're missing some words
@windowsrefund
@windowsrefund 26 күн бұрын
Oil is great. Btw, there is no such thing as a "folder".
@ascourter
@ascourter 26 күн бұрын
"directory" would be a better word. I think you get what I meant though.
@Markadown
@Markadown 5 күн бұрын
Sigh
@ascourter
@ascourter 5 күн бұрын
@@Markadown Why the sigh?
@Markadown
@Markadown 5 күн бұрын
@@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 5 күн бұрын
@@Markadown thanks. I figure they knew too haha
Intro to Customizing LazyVim
8:10
Andrew Courter
Рет қаралды 10 М.
Which is Better Flash.nvim OR Leap.nvim?
11:35
Andrew Courter
Рет қаралды 2,1 М.
The best home workout !! 😱😱
00:27
Tibo InShape
Рет қаралды 12 МЛН
Кәріс тіріма өзі ?  | Synyptas 3 | 8 серия
24:47
kak budto
Рет қаралды 1,7 МЛН
¡Puaj! No comas piruleta sucia, usa un gadget 😱 #herramienta
00:30
JOON Spanish
Рет қаралды 22 МЛН
Nix and NeoVim
13:38
ThePrimeTime
Рет қаралды 110 М.
Ultimate Quickfix List Guide
10:15
Andrew Courter
Рет қаралды 16 М.
Code Folding in Neovim
11:22
Andrew Courter
Рет қаралды 12 М.
How to rice Hyprland (Part 1)
11:08
sane1090x
Рет қаралды 1,9 М.
DEBUG in Neovim. Like a BOSS.
9:44
DevOps Toolbox
Рет қаралды 43 М.
Buffers, Windows, Tabs in Neovim
6:24
Andrew Courter
Рет қаралды 15 М.
Why Neovim nerds are so obsessed with the terminal
6:44
Joshua Morony
Рет қаралды 71 М.
Migrate from Notion to Obsidian
15:15
Andrew Courter
Рет қаралды 14 М.
Why Vim Experts Do THIS Instead of Using Tabs...
7:55
DevOps Toolbox
Рет қаралды 116 М.
Эволюция телефонов!
0:30
ТРЕНДИ ШОРТС
Рет қаралды 6 МЛН
How much charging is in your phone right now? 📱➡️ 🔋VS 🪫
0:11
Я Создал Новый Айфон!
0:59
FLV
Рет қаралды 4,2 МЛН
Обзор игрового компьютера Макса 2в1
23:34