I found my favorite neovim plugin
Вставка
- Опубліковано 7 січ 2025
- 🐦Twitter: / typecraft_dev
Fellas, oil.nvim is an amazing neovim package. In this video I'm going to show you how to install and use oil.nvim. It honestly hits the sweet spot of my workflow. I love to jump between directories and files, and create new files/directories from there. Oil.nvim allows you to navigate your dirs and create/edit filenames and dirs like a vim buffer. it truly is amazing and I hope you like it too.
thanks nerd
4:15 🤣
@@mahirabbas3700 🤣
Bro sounded like the prebuilt-homebuilt V12 engine 💀
Little bit of a different format for this video. What do you guys think? Take it easy, I have a big ego and a frail mind.
It's nice to see the face behind the radio voice. 😀
I saw this the other day and I've been using it. It's a fantastic plugin. The ` backtick/tilde key also does a :cd to that dir with the default keybinds. Useful for running relative path scripts/functions. Very nice!
Thanks man. this plugin is exactly what I was looking for since too long
4:13 the neovim experience in a nutshell
Glad you're liking it! Oil is built on the shoulders of giants (vim-vinegar, vidir, dirbuf.nvim), and I'm happy to see my humble iteration on this idea is useful. Cheers!
Thank you Steve for the amazing plug-in!
Hey, steve i been using Oil for months
It comes so handy in editing file-structure's
A big thx 🎉
Absolutely love your work man, good job!!
It's really helpful, thanks very much!
Actually, you can do the same with neo-tree, open explorer in current cwd, or with telescope-file-browser. I use both.
I do this with the built-in Netrw explorer. The only thing I changed was mapping '-' to open it.
Same here, but I use nvim-tree. It’s highly configurable. The dash binding is ingenous though.
@@-Kal- yeah I honestly don't see any value in this plugin
@@eminvesting😂, me too, wasting my data
The biggest advantage I found for Oil is that it allows you to manipulate the filetree as if it were lines of text, rather than as a different kind of object. Stuff like copy-paste directory, add new file, etc. follow the same finger-motions/finger-logic as regular Neovim. That was a HUGE plus for me and made it awkward to go back to other file options.
This is great. Exactly what I've been looking for
the way you say you should use lazy and then.. don't actually use any of its features is making me go insane
HAHA damn!
In all fairness, I do use some of its features in other parts of the plugins file. Maybe they're not visible in the video. But it's there I promise!
@@typecraft_dev Sorry I sent that at 3 am I didn't really mean it !
Looks like a lite version of dired from emacs. This is a great way of getting around and making bulk changes to files.
Yup it’s very similar
Dude this plugin is so damn good I had to comment.
Thank you!
Being able to edit the text of the TUI is a great idea
OMG! that's amazing. vim plugin developers are really genius
I've seen this video several months ago and your new ones just lately witg the moustache and I just figured out it's the same person. Wouldn't have guessed it without the channel's name.
This is great for not losing the (work)flow! Another plugin for the toolbox.
hell yeah brother!
this plugin saved my life.
Thanks for sharing that plugin! I think I'll like it.
Looks like it would pair well with the telescope file browser. Can you have it open a particular directory instead of the directory your current buffer is at? Because then maybe can bind a key to open the ditectory for whatever is selected by telescope file browser. That would be much quicker!
Was he using telescope? I've only ever used nerdtree & not familiar with others, but his looked nice.
Loving this plugin. Thanks!
I'm running a heavily modified nvchad and to get it working properly, I did pretty much the same config as you did but had to "lazy = false" in the plugin import to get everything working.
TypeCraft: its a beautiful day outside
Me: absolutely
Backgroud: I fixed my lazy+treesitter by removing packer from share folder
I'm using vim-plug, glad we're on talking terms 😉😘
Oil is cool - and I know its been around for quite some time now - but keeping speed in mind for moving between lot of different projects and directories, I still prefer the "ranger". Ranger allows lot of other features such as bookmarks and builtin commands to check size etc which was deal breaker for me - so no - I didn't switch to Oil.
I'm about ten seconds into the video
The background music is outrageous
Ah shit
I wonder: could you scaffold a new project by loading the directory structure from a saved file into a buffer and then run oil.nvim on it?
It looks like you could copy+paste from your existing project's oil buffer into your new project dir's oil buffer. Idk. Haven't used it.
need more content like this!🔥🔥
Sounds good!
I'm new to nvim but have been struggling to get my lunar vim to recognize my python virtual environments if you can possibly do a video on setting up this functionality would really appreciate it❤
Hey man, I have a question! You use a file tree plugin, but when you used dash to open the parent directory the buffer / the file you were editing disappeared, can you combo oil with a file tree plugin?
Is it possible to move files between directories using this plugin?
There's also mini.files. Which is much better IMO since it opens up as a little panel
Oil is super smooth
very cool. thanks for the tutorial!
Dumb question here; what's the advantage of oil over nerdtree?
I use both. Oil is great when I’m in a file and want to create something new in the same directory. Depends on preference really
Curious, is there any advantage to do that in a buffer vs directly with netrw?
Don't need to learn new bindings lol
This is true. It’s personal preference. I like that this is essentially another vim buffer
Oil is useful if you want to apply several actions at once. Let's say you wanted to rename several files at the same time (e.g. rename file1.txt to file1_new.txt, file2.txt to file2_new.txt and so on). With oil you can just use append "_new" to every line in the buffer (= each file) just like in a regular buffer. With traditional file browsers, you would have to run several commands instead.
@@smjonas8616 Oh yes that's very true.
Thanks everyone, very compelling reasons to give oil a go 👍
would like to see pressed keymaps
Oilright! Thanks for the share.
Very good plugin, what i dont understand, either this plugin or any neo tree filesystem is how can i create a file that is recognize by my LSP (LSP FORMATING for example) without leaving nvim and going back again on this newly created file.
That was my biggest problem, thank you so much
It's a novel concept, but definitely very tempting. But at the end of the day, I like way telescope-file-browser blends seamlessly with telescope, and I really don't create/edit files often enough to warrant making the switch.
you can have both, when exploring you use that one, and when creating this one, That's what i'm planning to do
if there is nvim-tree installed, then would oil.nvim be as effective?
I was looking for something like Emacs' writeable dired. This might be it.
i just realized.. isn’t this basically just a neovim version of dired in emacs lol
Just like the builtin file manager in Emacs :)
Indeed, an amazing plugin! Now I only want to manage files inside neovim
This looks great. Can you do mass-renaming with it?
Yes you can do it as you would in a normal buffer
this is neat! I'm curious what you use to grep within the current directory?
THIS IS SOOOO GOOD! Holly ****
Haha dammit I love this
@@typecraft_dev Thanks for this. This is legit a game changer for me
Hey, cool vid! How is it different from creating everything from your tree plugin?
It acts like a vim buffer. That’s essentially what I love about it. Less keybindings to remember
Is this a nvim-tree on the left?
I like oil but I want to see the folders on the side and I’m not sure if oil can do that so I use neotree which can also create files
that works too! (I actually use both)
neotree is kinda better I suppose. can create files and folders, copy, delete, rename, show/hide hidden files, search, filter. etc.
Can I ask a question about Neovim animation? Can I get the animation working on lazy vim ? I spend some hours but it didn’t work😢
which animation?
what colorscheme do you use?
In this video I’m using Dracula! Muwahahahaha
@@typecraft_dev thank you, I've turned into Dracula too :D
damn the compression in the first 10 seconds of the video
Looks cool, thanks for sharing.
so you got a filemanager in vim, whats so great about that in 2024 ?
Apparently renaming/creating/moving files in a vim fashion instead of having to switch to a different workflow like you have too with telescope for example.
I think he confused people by emphasizing it opens it in your cwd while it's something every file explorer does.
Can it be configured to startup in input mode?
To be honest, not really needing a plug-in like this… I’m super used to my vim workflow, but nice to have you on team Dracula…. F*** all those Tokyo Night dweebs.
I was thinking, hey cool maybe lazy now gets around you having to setup.... and then boom!
I'd find it really helpful if you had a keypad tracker on the screen. Great work! Subscribed.
ok yeah this is pretty cool
;)
poop is my go-to variable name if i dont have anything else
💩
Seems redundant to me, but maybe I just don't understand
Tried mini.files ?
the headphones - Oneodio 😹
OMG yes!!! I needed a cheap replacement for the dead Bose headphones I had.
@@typecraft_dev you got the wrong ones tho. The Oneodio Pro-50 (with those thicc pads) are a LOT more comfortable, and they sound better than the ones you got. But oh well, they're still good for the price 👍
I’m officially a cool neckbeard nerd
Hell yeah brother
then you will love "fern" even more
ctrl+z, cd?
damn, I use packer, had to close the video at 2 min lol
Sorry!
does it do mv or git mv?
You can rename a file and prepend the name with a dir to mv it to a different dir
@@typecraft_dev I was wondering whether it'll add the rename to git. Using normal move to rename files tracked with git is bad practice. If I can tell it to use git mv instead of normal mv when renaming files in a repo, that'd be great :)
you can do this exact same thing with stock vim
Whaaaaaaaaaaaaaaa?
@@typecraft_dev :Ex you can create a new directory with d, a new file with %, you can rename with R.
Gotta control those poops
Thanks typecraft, although I sense typescript from this name😅
such a cool, but not enough to build it from scratch from first time.
The empty plastic container echo sound your keyboard makes when the keys recoil drives me insane. :/
Aw damn it’s a nice keyboard. Happy hacking silent Bluetooth I love it
Ohh man this is good!!
Nice video! 5.2 => 6k🙌🙌
whats the difference between this and nvim tree? if i already have nvim tree installed can't i just open it up and use that?
I use both! I just love popping open a buffer within my current directory. The file creation / renaming is more straightforward in this plugin because its just another buffer and not some file explorer with its own keybindings and whatnot
oil ???!?!?!??! freedom 🔫🔫
cool, gonna try it now
GOGOGO
@@typecraft_dev it conflicts with nvim-tree though, how can you get both to work?
@@thelonerat9557 it does? I use both in this video
@@typecraft_dev solved it, need to turn off hijack_directories of nvim-tree.
Love it ❤
Thanks!
You can do same exact same thing using the nvimtree which you already have in your config
👀
You didn't seem to have understood the point of this plugin ^^
mini.files does the same thing
Another tool for the chastity belt. Oyeah.
this feels more like emacs to me...
Really?
@@typecraft_dev yes it feels very much like dired to me. Even if targeted towards vertico. I’m smiling because after neovim I moved to treemacs as I liked nerd tree and neovim users make like a emphasis on buffers. The work flow at least…
Nvim-tree and neo-tree are better in my opinion.
Just saying, cool guy use fuzzy find to open file hahahah
Dired
No!!! Don't let emacs methods go to vim (:horor)
Wow, this is so complicated.
For being a bearded hipster your plug-in managing strategy is quite lame ;)
Lol damn
@@typecraft_dev don't get me wrong, when I was using packer I had a similar setup. But using lazy you can have everything in a single file: plugin spec, configuration and keymaps
@@Danielo515 ewwww
if you were actually cool, you wouldn't be on macos -_-
all jokes mac >>>> windows lol
poops_controller
Gotta make yourself laugh sometimes lol