Glad to hear you're enjoying oil nvim! There are more features, but honestly I mostly just use it like you do. The main motivation for writing it was that I could never remember the keymaps for mark+move multiple files in lir 😅
I swear every time I watch someone talk about their config I learn a new command cib ("change inner bracket") was the first one for me of that (deletes content in between brackets/parens and enters insert mode)
@@cwjdog57ca( (change around brackets) would include those brackets as well. This can be used for also any symbol as well, like quotes or # comment blocks
At the moment I use Netrw for all this stuff, but it feels a bit obtuse at times. Anything more complex then what you showed in this video I would have done on the command line anyway, so I think I'll be adding oil to my config. Thanks for the spotlight!
my favorite feature is the ability to move files by just cutting and pasting file/directory names anywhere (to a different directory) it even works ACROSS SPLITS!!!! this is crazy
ya, it just makes me nervous because i'm worried i'll lose the file somehow LUL but it's a very cool one (didn't want to be responsible for people messing it up though haha)
It's a little tricky to paste files into a new directory, because when I want to create one I have to save, and if I already deleted the files to be pasted in the new dir, the save for creating the dir also deletes the files. So if you're careful about the order it's possible, but could definitely use improvement
OIl is one of my favourite plugins! I've been transitioning to Neovim over the last year or so from Sublime/VS Code/Atom/etc. and one of the things I've really enjoyed is being able to build my own workflow instead of just having a VS Code-ified editor like before. Using Oil and Telescope for file structure editing and navigation instead of a sidebar file tree has been by FAR the most impactful change and I honestly can't go back.
Man, did I love the Ranger file manager for this type of stuff. Sadly couldn’t get it on Windows. Glad you shared this so I can get some of that juicy file manipulation from Neovim. Thank you!
I'm using oil for over a year now and have been doing some *aggressive* things in it, deleting, moving, copy, pasting, renaming pasted folders that were delete, doing this over several splits of oil. And it handled everything perfectly and I never lost a file. Which makes sense, when you know how it's doing its thing under the hood. I also never got used to the floating window. It competes with my mental space of telescope/fzf-lua. I have mapped `_` to `vnew %:h` and `-` to open oil at cwd. I'm usually a purist when it comes to plugins; but oil is one of the exceptions in my config.
Love oil, but recently switched to mini.files. The same "file-system as buffer" stuff, but easily allows viewing parent directories(multiple levels if needed) and previews
Oil is amazing. I basically live in the terminal, and moving many files, mass renaming etc. just isn't as convenient as it is in a GUI, but I could never get the hang of a terminal file manager like Ranger. Oil completely changed that; I use it for so many things. I even have an alias to open it from the shell (alias vf 'nvim -c Oil'), so it effectively becomes a file manager for me.
Try this... delete a file with `dd` and then go the folder you want and press `p` to move the file to a different folder. It feels great that this even works 👌
Oh, this is exactly what I need! I use netrw as I’ve also started to appreciate the simplicity of having the editor full screen. But netrw is such a pain when it comes to moving lots of files, especially in nested folders. I’ve always resorted to writing a shell script for such cases, but now, I can just use this instead!
rtoil has been a mainstay in my collection of plugins, I really don't like / need file trees. One cool thing I thought you did not mention is when you copy / paste in oil, the content of the newly created file is a copy of the old one! One thing I could not configure, but it does not bother me a lot, is that keeps splitting the oil window even when configuring keymaps as in your example. This interferes with seamlessly jumping between Neovim and tmux panes. UPDATE: I found out what I did wrong. There is an additional setting in my oil configuration which comes _after_ the key mappings which is `use_default_keymaps`. Setting it to `false` made it work.
Damn, I’ll definitely check this one out! I’ve been struggling for a while with files manipulation when doing big refactoring in my monorepo and this will help for sure! I’m also navigating a lot to neighbour files and was thinking of adding a keymap that would open telescope with only the files of the current directory and under. For now I heavily use :e %:h/* to move between neighbour files quickly
I used to have nvim-tree but literally only when the thing that I wanted to do was edit a directory, like change the folder structure or add multiple files to it. oil fills that specific need because that is exactly what it is useful for, and it's so much better at it than ur traditional file tree plugins
Renaming files in a vim buffer is extremely efficient. I use ranger as file manager, which has this function as bulkrename. But oil.nvim might still be helpful when I’m already in nvim at the time.
I use and recommend mini.files (very fast navigation with h/l, previews, files' creation/deletion like oil.nvim). I mapped: - to mini.files in the current directorry; - pv to mini.files at the root of the git/darcs project (pv: project view) I didn't like oil.nvim (or vim-vinegar) the last time I tried it: there's an ugly side effect that breaks Netrw (you may still need; in my setup, when there's no file, it opens Netrw and no plugin (execept colorscheme) is loaded thanks to the lazy package manager).
I like the idea of oil.nvim. It looks more useful for sysadmins than for software developers though (I'm the latter, which is why I prefer tree views).
I just discovered that you can change the permissions using oil! In the setup, add "permissions" as one of the columns, and you can just edit the rwx for the user/group/other. E.g. if you have a script, with the following permissions "rw-r--r--" and you change it to "rwxr-xr-x" it becomes executable!
Whats is this? hahahha awesome plugin, I have been using netrw since the beginning that I work with neovim and I always have problems to delete or move dirs that have files inside, Oil will help me a lot!!! Thanks Tj
I recently moved to Netrw from neo-tree because of the fs in buffer feature. Netrw, although somewhat lumpish, does everything I need from navigation to file editing right now. Oil looks pretty amazing though and I’ll give oil a try.
It's an amazing plugin! It's even replacing vifm for me. The *only* weakness I found is that I can't see the file attributes to check last modified date. Most of the time I don't need that, but I was using it in a directory where I needed to see which copy of a file was the most recently modified, so that I could delete the others. As far as I can tell, you can't get the attributes. Shame.
For whatever reason, TJ sounded to me like he had this sarcastic tone throughout the video that it took me a while to realise everything he said he meant seriously.
If you like oil, then you should check out mini.files. Same ability to edit the buffer with changes reflected on the file system. The difference, however, is that mini.files has a much nicer UI that allows you to navigate a whole file system extremely quickly with more context of where you are. Finally, previews in mini.files are extremely quick whereas previews in oil are slow.
About file trees etc, I find them useful to keep the left portion of the screen occupied, so that the editor is almost at the center, otherwise, having a pretty big screen I always have to keep my eyes looking left instead of in front of me, I find this annoying. There are other plugins like no-neck-pain, etc but I think having something useful in that portion of the screen is more important. What do you think about it?
When i heard about Oil i thought it was perfect! Until i actually decided to use it. There's a few things that simply don't work the way i think, for example renaming file to newdir/file is ok but renaming it to existingdir/file gives you an error, and using caw to change the file name brings up an otherwise invisible id into your buffer which is quite annoying I'm currently using mini.files (aka 'the floating one') and i think it's a much better experience, it works the way I think and its crazy smooth to navigate up and down directories. That being said, i would also prefer it not floating, but i couldn't find out if that's possible yet.
Personally for everything outside editing text, i just use the terminal. Want to move into directories? Zoxide Want to list files? lsd Want to list files in a cool way? lsd --tree Want to do crazy stuff? There are tons of utils to do whatever you want. In neovim i like to just have a single window open and i just move around buffers with :bn / :bp or with lsp keybindings
Using this for long, I use oil for renaming and create and changing file location the functions which are not available telescope i mostly use telescope for navigation and i'm pop up window guy. Its nice plug in
Awesome video! The gx command (to open links in the browser for example) doesn't work when I use oil.nvim (there is a closed issue on that though :/). Any workarounds? Thanks
"I'm not a filetree enjoyer as we've talked about a few other times". Interesting take, do you have any links were you've discussed this? Would like to see you talk about this directly in a video
After using oil other file managers feel claustrophobic. As working on DevOps tasks there are lots of yamls and dirs I have to create where I don't need a file tree but need a good dir manager. Oil fits that purpose perfectly.
hey, nvim beginner here, how did you add "example" prefix to all these lines at 3:57 ? looks like a macro but you selected beforehand where you would apply it with a block selection?
Until you run into random Neovim crashes when trying to create a file or a directory. I really liked oil.nvim but the random crashes got more and more. Even on a fresh config. And the creator can’t seem to reproduce it. I switched to Mini.files that has the same functionality but uses more like a ranger type layout as an overlay instead of a new buffer. It works really well.
oil has a very handy way of extending its capabilities, for example, there is no built-in keymap to open something using xdg-open, but I added it with a few lines and it just works
im assuming u could recreate vinegar's . (dot) command that enters command mode with the name of the file at the end of the command so u can do .!chmod +x i think you probably dont want to remap . directly though to keep the default behaviour of repeating the last action. but maybe something like .
This looks really coool. but for my most used operations, adding/renaming/deleting files and directories, NvimTree is more than enough. But really cool that Oil treats the "Directory View" as a text buffer, just like i treat my whole life as a text buffer.
I really like the idea of editing files with oil, however I feel like I need a tree. Currently I use nvim-tree, never use it on the side, only like netwr, fullscreen, but I can also :Oil to edit the directory with oil. Imo it would be awesome if oil had a tree
@@billeterk I think Olive would be a sick name for a plugin like that I thought about making it myself, and then saw how big Oil.nvim source is for s plugin that relatively simple, and I don't think I will.
I started using nvim tree or smth like that just to modify and see structure of a filesystem with hints about git and lsp. Everything else telescope handles better IMO
Glad to hear you're enjoying oil nvim! There are more features, but honestly I mostly just use it like you do. The main motivation for writing it was that I could never remember the keymaps for mark+move multiple files in lir 😅
What a pity we can't move file by appending 'other_dir/' to it's name. Is this related with plugin's philosophy?
Loving these videos breaking down your config! Thanks teej, keep 'em coming!
two more coming this week :)
Me too!
Big fan of Oil, editing your project files as a buffer feels really intuitive compared to other file exploring alternatives in nvim
Saying what command you ran ("dt.") is freaking gold for anyone that isn't yet a vimzard. Cheers for the content!
same here, I stopped the video right away to try it :) I've been using "f" for these type of actions but didn't know about "t"
I swear every time I watch someone talk about their config I learn a new command
cib ("change inner bracket") was the first one for me of that (deletes content in between brackets/parens and enters insert mode)
@@cwjdog57ca( (change around brackets) would include those brackets as well.
This can be used for also any symbol as well, like quotes or # comment blocks
Oh wow. That is great. I always used ci( or ci[.
oil's SSH feature is really nice for viewing/editing files on remote machines in a pinch
At the moment I use Netrw for all this stuff, but it feels a bit obtuse at times. Anything more complex then what you showed in this video I would have done on the command line anyway, so I think I'll be adding oil to my config. Thanks for the spotlight!
nice!
@@teej_dvthese types of videos where you show an interesting plugin are very useful! Keep it up TJ!
my discovery of oil has changed the way I do things in NeoVim.
Thank you for this amazing video
my favorite feature is the ability to move files by just cutting and pasting file/directory names anywhere (to a different directory)
it even works ACROSS SPLITS!!!! this is crazy
ya, it just makes me nervous because i'm worried i'll lose the file somehow LUL but it's a very cool one (didn't want to be responsible for people messing it up though haha)
It's a little tricky to paste files into a new directory, because when I want to create one I have to save, and if I already deleted the files to be pasted in the new dir, the save for creating the dir also deletes the files. So if you're careful about the order it's possible, but could definitely use improvement
@@casraf you can enter a new directory before you :w to create it :)
@@stevearc is that so? I'll try! Maybe I thought I did but didn't
haha i actually ran into that issue before, lost some files. when i tried to paste and save it said those were invalid files 😢
OIl is one of my favourite plugins! I've been transitioning to Neovim over the last year or so from Sublime/VS Code/Atom/etc. and one of the things I've really enjoyed is being able to build my own workflow instead of just having a VS Code-ified editor like before. Using Oil and Telescope for file structure editing and navigation instead of a sidebar file tree has been by FAR the most impactful change and I honestly can't go back.
Man, did I love the Ranger file manager for this type of stuff. Sadly couldn’t get it on Windows. Glad you shared this so I can get some of that juicy file manipulation from Neovim. Thank you!
This is my favorite way to explore new plugins! Thank you teej!
I love that you can duplicate the line and it will create a copy of the file! I use that a lot.
I'm using oil for over a year now and have been doing some *aggressive* things in it, deleting, moving, copy, pasting, renaming pasted folders that were delete, doing this over several splits of oil. And it handled everything perfectly and I never lost a file. Which makes sense, when you know how it's doing its thing under the hood.
I also never got used to the floating window. It competes with my mental space of telescope/fzf-lua. I have mapped `_` to `vnew %:h` and `-` to open oil at cwd.
I'm usually a purist when it comes to plugins; but oil is one of the exceptions in my config.
Wow Oil is fantastic! the workflow is so much better than a sidebar treeview, nice! 👍
Love oil, but recently switched to mini.files. The same "file-system as buffer" stuff, but easily allows viewing parent directories(multiple levels if needed) and previews
Love the mini plugins, will check that one out.
Oil is amazing. I basically live in the terminal, and moving many files, mass renaming etc. just isn't as convenient as it is in a GUI, but I could never get the hang of a terminal file manager like Ranger. Oil completely changed that; I use it for so many things. I even have an alias to open it from the shell (alias vf 'nvim -c Oil'), so it effectively becomes a file manager for me.
Try this... delete a file with `dd` and then go the folder you want and press `p` to move the file to a different folder. It feels great that this even works 👌
I wish I knew this existed before today! Fits perfectly with my workflow.
Oh, this is exactly what I need! I use netrw as I’ve also started to appreciate the simplicity of having the editor full screen. But netrw is such a pain when it comes to moving lots of files, especially in nested folders. I’ve always resorted to writing a shell script for such cases, but now, I can just use this instead!
Your daily uploads are awesome. Keep the fire going
Loving these smaller videos showcasing plugins TJ!!! Keep them coming please!
rtoil has been a mainstay in my collection of plugins, I really don't like / need file trees. One cool thing I thought you did not mention is when you copy / paste in oil, the content of the newly created file is a copy of the old one!
One thing I could not configure, but it does not bother me a lot, is that keeps splitting the oil window even when configuring keymaps as in your example. This interferes with seamlessly jumping between Neovim and tmux panes.
UPDATE: I found out what I did wrong. There is an additional setting in my oil configuration which comes _after_ the key mappings which is `use_default_keymaps`. Setting it to `false` made it work.
i'd love a video covering your opions on some of the major neovim distros. maybe about ur issues with some of their designs or their configuration
OMG, I was looking for the Ctrl+v thingy for ages, thanks!
Thanks for the video helped me set it up, that shortcut was genius.
Damn, I’ll definitely check this one out! I’ve been struggling for a while with files manipulation when doing big refactoring in my monorepo and this will help for sure! I’m also navigating a lot to neighbour files and was thinking of adding a keymap that would open telescope with only the files of the current directory and under. For now I heavily use :e %:h/* to move between neighbour files quickly
I used to have nvim-tree but literally only when the thing that I wanted to do was edit a directory, like change the folder structure or add multiple files to it. oil fills that specific need because that is exactly what it is useful for, and it's so much better at it than ur traditional file tree plugins
Great video, keeping learning small details almost every time, was unaware of 'e!', and oil.nvim looks handy
Renaming files in a vim buffer is extremely efficient. I use ranger as file manager, which has this function as bulkrename. But oil.nvim might still be helpful when I’m already in nvim at the time.
My favorite plugin ever
Oil is amazing, been using it for a long time
I use and recommend mini.files (very fast navigation with h/l, previews, files' creation/deletion like oil.nvim). I mapped:
- to mini.files in the current directorry;
- pv to mini.files at the root of the git/darcs project (pv: project view)
I didn't like oil.nvim (or vim-vinegar) the last time I tried it: there's an ugly side effect that breaks Netrw (you may still need; in my setup, when there's no file, it opens Netrw and no plugin (execept colorscheme) is loaded thanks to the lazy package manager).
I like the idea of oil.nvim. It looks more useful for sysadmins than for software developers though (I'm the latter, which is why I prefer tree views).
Oil is really cool, I've been using it for a while now. Way better than file tree for sure
Agreed! You have to convince Prime too! :D
It'll be a hard pitch! Maybe if they change the name to coconut-oil though...
Oil was what I wanted for so long. VSC*de in shambles after this video dropped.
vsc*de was in shambles before this video
I just discovered that you can change the permissions using oil! In the setup, add "permissions" as one of the columns, and you can just edit the rwx for the user/group/other. E.g. if you have a script, with the following permissions "rw-r--r--" and you change it to "rwxr-xr-x" it becomes executable!
TIL dt
Hey teej, I really enjoy these plugin videos!
Whats is this? hahahha awesome plugin, I have been using netrw since the beginning that I work with neovim and I always have problems to delete or move dirs that have files inside, Oil will help me a lot!!!
Thanks Tj
Very awesome, thanks for sharing
if you're digging oil you'll probably really enjoy mini.files - it's just a bit less obtrusive imo. thanks for all the info teej!
I have integrated oil in my lf file manager config to be used for bulk rename. While exclusively in nvim, I use it for navigation to neighboring files
I was just thinking this would work well with a terminal based file manager. Care to share your setup?
Sure. I have GitHub link in profile. My current setup requires tmux to show nvim with oil in a same window but could be changed
I recently moved to Netrw from neo-tree because of the fs in buffer feature. Netrw, although somewhat lumpish, does everything I need from navigation to file editing right now. Oil looks pretty amazing though and I’ll give oil a try.
Loving oil, but need a command to quickly open directories within the oil buffer to move files over "greater distances".
I need more of this type of videos
*laughs in dired*
Guffaws in Dirvish
It's an amazing plugin! It's even replacing vifm for me. The *only* weakness I found is that I can't see the file attributes to check last modified date. Most of the time I don't need that, but I was using it in a directory where I needed to see which copy of a file was the most recently modified, so that I could delete the others. As far as I can tell, you can't get the attributes. Shame.
This is basically emacs' directory editor Dired
For whatever reason, TJ sounded to me like he had this sarcastic tone throughout the video that it took me a while to realise everything he said he meant seriously.
Oil is life.
Okay, just ditched nnn for this. Just feels awesome.
Oil is da 💣. Great video!
Teej you're a great explainer!
So it's like "dired" for emacs, only not as evolved.
I've used the ranger file manager's `:bulkrename` command for similar stuff in the past.
idk what nvim is but I came here to spread democracy 🦅🦅🦅🦅🦅🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸🇺🇸
Hey fam, great content, one question though - why are you wearing headphones while recording YT videos?
So it’s like Emacs’s dired?
If you like oil, then you should check out mini.files. Same ability to edit the buffer with changes reflected on the file system. The difference, however, is that mini.files has a much nicer UI that allows you to navigate a whole file system extremely quickly with more context of where you are. Finally, previews in mini.files are extremely quick whereas previews in oil are slow.
About file trees etc, I find them useful to keep the left portion of the screen occupied, so that the editor is almost at the center, otherwise, having a pretty big screen I always have to keep my eyes looking left instead of in front of me, I find this annoying. There are other plugins like no-neck-pain, etc but I think having something useful in that portion of the screen is more important. What do you think about it?
Could you please do a video on how you manage project scooped neovim configurations?
When i heard about Oil i thought it was perfect! Until i actually decided to use it. There's a few things that simply don't work the way i think, for example renaming file to newdir/file is ok but renaming it to existingdir/file gives you an error, and using caw to change the file name brings up an otherwise invisible id into your buffer which is quite annoying
I'm currently using mini.files (aka 'the floating one') and i think it's a much better experience, it works the way I think and its crazy smooth to navigate up and down directories. That being said, i would also prefer it not floating, but i couldn't find out if that's possible yet.
Oiled up nvim 😈
Imo oil.nvim is what neovims native file explorer should be.
love this series!
Great video! Thanks a lot!
Time to get oiled.
Is this the same as dired in emacs?
Cannot unsee.
Personally for everything outside editing text, i just use the terminal.
Want to move into directories? Zoxide
Want to list files? lsd
Want to list files in a cool way? lsd --tree
Want to do crazy stuff? There are tons of utils to do whatever you want.
In neovim i like to just have a single window open and i just move around buffers with :bn / :bp or with lsp keybindings
have you tried using :b to select buffers by name?
Using this for long, I use oil for renaming and create and changing file location the functions which are not available telescope i mostly use telescope for navigation and i'm pop up window guy. Its nice plug in
Also, oil is superior to dired's C-x C-q (Editable Dired) because Neovim is superior to Emacs. Based and nvimpilled!
very big brain argument
Awesome video! The gx command (to open links in the browser for example) doesn't work when I use oil.nvim (there is a closed issue on that though :/). Any workarounds? Thanks
literally netrw but better. Should make this the nvim builtin!
oil nvim is the best :)
Entirely unrelated, but what was the theme you had in your vim9script to lua transpiler video? it was really nice
It should be basically the same theme but probably different background color - i changed to a darker background awhile ago
love it
How did you add `example-` prefix to all file names that fast?
I prefer floating telescope-file-browser but oil is really good, nonetheless
thanks TJ
NOICE!
"I'm not a filetree enjoyer as we've talked about a few other times". Interesting take, do you have any links were you've discussed this? Would like to see you talk about this directly in a video
I need lotion.nvim for my arch bros.
I like to open a split and move files from one place to another. Can be in 2 places at one time.
Absolutely love oil.nvim
same :)
Looks cool! How did you do the "multi-cursor" edit of all file names at 3:58?
that's "visual block" mode - press ctrl-v and do some movements, then "i" to insert some text. it's builtin!
@@teej_dv do you mean "". Cause "i" is used for "select in something" feature
sorry, ya, was typing on mobile haha
Is there any plugins that allow to move/rename file then it will automatic update the import path code?
After using oil other file managers feel claustrophobic. As working on DevOps tasks there are lots of yamls and dirs I have to create where I don't need a file tree but need a good dir manager. Oil fits that purpose perfectly.
hey, nvim beginner here, how did you add "example" prefix to all these lines at 3:57 ?
looks like a macro but you selected beforehand where you would apply it with a block selection?
Think it was ctrl-v and then shift-i (insertion)
@@vice-sama3015 nice, thank you!
So basically nvimtree but in buffer with command access?
Until you run into random Neovim crashes when trying to create a file or a directory. I really liked oil.nvim but the random crashes got more and more. Even on a fresh config. And the creator can’t seem to reproduce it. I switched to Mini.files that has the same functionality but uses more like a ranger type layout as an overlay instead of a new buffer. It works really well.
I can finally move off nvim-tree!
Cool plug-in. Can it work on permissions?for example, make a file executable chmod +x?
oil has a very handy way of extending its capabilities, for example, there is no built-in keymap to open something using xdg-open, but I added it with a few lines and it just works
ya, I think it would be possible to do quite easily
im assuming u could recreate vinegar's . (dot) command that enters command mode with the name of the file at the end of the command so u can do .!chmod +x
i think you probably dont want to remap . directly though to keep the default behaviour of repeating the last action. but maybe something like .
I used this a while ago but it would leave hidden .oil files/directories all over the place and I couldn't work out why. I use mini.files now
I really like the mini plugins, I will check out files
This looks really coool. but for my most used operations, adding/renaming/deleting files and directories, NvimTree is more than enough.
But really cool that Oil treats the "Directory View" as a text buffer, just like i treat my whole life as a text buffer.
> just like i treat my whole life as a text buffer.
Saying this is the most Vim thing ever, definitely gonna steal it 😂
@@yochem9294 steal away my friend. Spread the word 😂😂
I really like the idea of editing files with oil, however I feel like I need a tree.
Currently I use nvim-tree, never use it on the side, only like netwr, fullscreen, but I can also :Oil to edit the directory with oil.
Imo it would be awesome if oil had a tree
Tea tree oil
@@billeterk I think Olive would be a sick name for a plugin like that
I thought about making it myself, and then saw how big Oil.nvim source is for s plugin that relatively simple, and I don't think I will.
how did you add "example" to every file like that?
I started using nvim tree or smth like that just to modify and see structure of a filesystem with hints about git and lsp. Everything else telescope handles better IMO
How did you rename all other files 4:00? It could be done using :normal but I can't see you typing it.
I think he did ctrl-v for blockwise visual mode and then GIexample-
Me when I have been using VIFM for years...