Oil.nvim - My Favorite Addition to my Neovim Config

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

I've really been enjoying oil.nvim lately - it's a great plugin that makes it so easy to edit, and do some simple navigation through the filesystem with neovim:
Oil: github.com/stevearc/oil.nvim
Configuration: github.com/tjdevries/config.nvim
Oil Config: github.com/tjdevries/config.n...
Links
Twitch: / teej_dv
Twitter: / teej_dv
Github: github.com/tjdevries
Neovim: BTW
#neovim #programming #lua

Пікірлер: 171

  • @stevearc
    @stevearcАй бұрын

    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 😅

  • @iusehjkl

    @iusehjkl

    Ай бұрын

    What a pity we can't move file by appending 'other_dir/' to it's name. Is this related with plugin's philosophy?

  • @riccardoshrives5881
    @riccardoshrives5881Ай бұрын

    Loving these videos breaking down your config! Thanks teej, keep 'em coming!

  • @teej_dv

    @teej_dv

    Ай бұрын

    two more coming this week :)

  • @lpanebr

    @lpanebr

    Ай бұрын

    Me too!

  • @raoulkent
    @raoulkentАй бұрын

    Saying what command you ran ("dt.") is freaking gold for anyone that isn't yet a vimzard. Cheers for the content!

  • @nemethda

    @nemethda

    Ай бұрын

    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"

  • @cwjdog57

    @cwjdog57

    Ай бұрын

    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)

  • @vinothkmr

    @vinothkmr

    Ай бұрын

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

  • @Perry3D

    @Perry3D

    Ай бұрын

    Oh wow. That is great. I always used ci( or ci[.

  • @ShallowClone
    @ShallowCloneАй бұрын

    Big fan of Oil, editing your project files as a buffer feels really intuitive compared to other file exploring alternatives in nvim

  • @zacbackas
    @zacbackasАй бұрын

    oil's SSH feature is really nice for viewing/editing files on remote machines in a pinch

  • @MohammadLsk
    @MohammadLskАй бұрын

    Your daily uploads are awesome. Keep the fire going

  • @aoshifo
    @aoshifoАй бұрын

    This is my favorite way to explore new plugins! Thank you teej!

  • @SickMcNugget
    @SickMcNuggetАй бұрын

    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!

  • @teej_dv

    @teej_dv

    Ай бұрын

    nice!

  • @dakata2416

    @dakata2416

    Ай бұрын

    ​@@teej_dvthese types of videos where you show an interesting plugin are very useful! Keep it up TJ!

  • @Majiy00
    @Majiy00Ай бұрын

    Loving these smaller videos showcasing plugins TJ!!! Keep them coming please!

  • @user-st3yv3to8r
    @user-st3yv3to8rАй бұрын

    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

  • @teej_dv

    @teej_dv

    Ай бұрын

    Love the mini plugins, will check that one out.

  • @yyvan5125
    @yyvan5125Ай бұрын

    Hey teej, I really enjoy these plugin videos!

  • @nasso_
    @nasso_Ай бұрын

    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

  • @teej_dv

    @teej_dv

    Ай бұрын

    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)

  • @casraf

    @casraf

    Ай бұрын

    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

  • @stevearc

    @stevearc

    Ай бұрын

    @@casraf you can enter a new directory before you :w to create it :)

  • @casraf

    @casraf

    Ай бұрын

    @@stevearc is that so? I'll try! Maybe I thought I did but didn't

  • @mzzzchael

    @mzzzchael

    Ай бұрын

    haha i actually ran into that issue before, lost some files. when i tried to paste and save it said those were invalid files 😢

  • @danieldosen5260
    @danieldosen5260Ай бұрын

    I wish I knew this existed before today! Fits perfectly with my workflow.

  • @bloodandbonezzz
    @bloodandbonezzz11 күн бұрын

    Thanks for the video helped me set it up, that shortcut was genius.

  • @ChrisPatti
    @ChrisPattiАй бұрын

    Oil is da 💣. Great video!

  • @adibhanna
    @adibhannaАй бұрын

    love this series!

  • @friendly__drone9352
    @friendly__drone9352Ай бұрын

    Teej you're a great explainer!

  • @casperon7
    @casperon7Ай бұрын

    OMG, I was looking for the Ctrl+v thingy for ages, thanks!

  • @TheBeatlemobile
    @TheBeatlemobileАй бұрын

    My favorite plugin ever

  • @shock9616
    @shock9616Ай бұрын

    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.

  • @adriancostin9138
    @adriancostin9138Ай бұрын

    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!

  • @doop9713
    @doop9713Ай бұрын

    Very awesome, thanks for sharing

  • @rodelias9378
    @rodelias9378Ай бұрын

    Great video! Thanks a lot!

  • @_bitties
    @_bittiesАй бұрын

    I need more of this type of videos

  • @comfysage
    @comfysageАй бұрын

    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

  • @will_1536
    @will_15366 күн бұрын

    Oil is amazing, been using it for a long time

  • @niza.v1
    @niza.v1Ай бұрын

    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!

  • @yodokoro
    @yodokoroАй бұрын

    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

  • @JoshMedeski
    @JoshMedeskiАй бұрын

    I love that you can duplicate the line and it will create a copy of the file! I use that a lot.

  • @Gustafonair
    @GustafonairАй бұрын

    Great video, keeping learning small details almost every time, was unaware of 'e!', and oil.nvim looks handy

  • @maleldil1
    @maleldil1Ай бұрын

    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.

  • @j1d7s
    @j1d7sАй бұрын

    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.

  • @2mbst1
    @2mbst1Ай бұрын

    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.

  • @manideeppolireddi
    @manideeppolireddiАй бұрын

    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 👌

  • @MartialBoniou
    @MartialBoniouАй бұрын

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

  • @adjbutler
    @adjbutlerАй бұрын

    love it

  • @josecarloscirqueirajunior2914
    @josecarloscirqueirajunior2914Ай бұрын

    thanks TJ

  • @eamonburns9597
    @eamonburns9597Ай бұрын

    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!

  • @_bradleystrider
    @_bradleystriderАй бұрын

    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

  • @user-xw2zr2lw9e
    @user-xw2zr2lw9eАй бұрын

    Oiled up nvim 😈

  • @Morpheus451
    @Morpheus451Ай бұрын

    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.

  • @Redyf
    @RedyfАй бұрын

    Oil is really cool, I've been using it for a while now. Way better than file tree for sure

  • @redbrick808
    @redbrick808Ай бұрын

    Oil is life.

  • @mainendra
    @mainendraАй бұрын

    Recently I've started using mini nvim plugins and mini files has similar features with tree like structure. might be a good one to explore.

  • @RedOchsenbein
    @RedOchsenbeinАй бұрын

    Okay, just ditched nnn for this. Just feels awesome.

  • @redcoreit
    @redcoreitАй бұрын

    Agreed! You have to convince Prime too! :D

  • @lpanebr

    @lpanebr

    Ай бұрын

    It'll be a hard pitch! Maybe if they change the name to coconut-oil though...

  • @thepatzer
    @thepatzerАй бұрын

    Yesss! Welcome to the oil.nvim hype train!

  • @oalfodr
    @oalfodrАй бұрын

    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

  • @IainSimmons

    @IainSimmons

    Ай бұрын

    I was just thinking this would work well with a terminal based file manager. Care to share your setup?

  • @oalfodr

    @oalfodr

    Ай бұрын

    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

  • @rika-chan
    @rika-chanАй бұрын

    I've used the ranger file manager's `:bulkrename` command for similar stuff in the past.

  • @freedo201
    @freedo201Ай бұрын

    NOICE!

  • @edwardminnix7438
    @edwardminnix7438Ай бұрын

    So it’s like Emacs’s dired?

  • @gideonidoko
    @gideonidokoАй бұрын

    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.

  • @casperon7
    @casperon7Ай бұрын

    Hey fam, great content, one question though - why are you wearing headphones while recording YT videos?

  • @Argletrough
    @ArgletroughАй бұрын

    *laughs in dired*

  • @samgould8567

    @samgould8567

    Ай бұрын

    Guffaws in Dirvish

  • @daltonyon
    @daltonyonАй бұрын

    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

  • @jimhrelb2135
    @jimhrelb2135Ай бұрын

    Oil was what I wanted for so long. VSC*de in shambles after this video dropped.

  • @vsz-z2428

    @vsz-z2428

    Ай бұрын

    vsc*de was in shambles before this video

  • @RazoBeckett.
    @RazoBeckett.Ай бұрын

    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

  • @rwz
    @rwzАй бұрын

    Loving oil, but need a command to quickly open directories within the oil buffer to move files over "greater distances".

  • @alihammadshah
    @alihammadshahАй бұрын

    Could you please do a video on how you manage project scooped neovim configurations?

  • @lmnts556
    @lmnts556Ай бұрын

    I like to open a split and move files from one place to another. Can be in 2 places at one time.

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_charsАй бұрын

    oil nvim is the best :)

  • @tobias-edwards
    @tobias-edwardsАй бұрын

    Looks cool! How did you do the "multi-cursor" edit of all file names at 3:58?

  • @teej_dv

    @teej_dv

    Ай бұрын

    that's "visual block" mode - press ctrl-v and do some movements, then "i" to insert some text. it's builtin!

  • @oliverfoxi

    @oliverfoxi

    Ай бұрын

    @@teej_dv do you mean "". Cause "i" is used for "select in something" feature

  • @teej_dv

    @teej_dv

    Ай бұрын

    sorry, ya, was typing on mobile haha

  • @neovimnewb
    @neovimnewbАй бұрын

    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

  • @ejreillyxyz
    @ejreillyxyzАй бұрын

    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!

  • @frankslsh
    @frankslshАй бұрын

    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?

  • @muizzyranking
    @muizzyrankingАй бұрын

    Time to get oiled.

  • @tauiin
    @tauiinАй бұрын

    Entirely unrelated, but what was the theme you had in your vim9script to lua transpiler video? it was really nice

  • @teej_dv

    @teej_dv

    Ай бұрын

    It should be basically the same theme but probably different background color - i changed to a darker background awhile ago

  • @sutirk
    @sutirkАй бұрын

    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.

  • @Avbanks23
    @Avbanks23Ай бұрын

    This is basically emacs' directory editor Dired

  • @danielschmitt5750
    @danielschmitt5750Ай бұрын

    Imo oil.nvim is what neovims native file explorer should be.

  • @Denis-ez8gd
    @Denis-ez8gdАй бұрын

    How did you add `example-` prefix to all file names that fast?

  • @Twixmonster2
    @Twixmonster2Ай бұрын

    Is this the same as dired in emacs?

  • @defnlife1683

    @defnlife1683

    Ай бұрын

    Cannot unsee.

  • @casraf
    @casrafАй бұрын

    Absolutely love oil.nvim

  • @teej_dv

    @teej_dv

    Ай бұрын

    same :)

  • @s-xatya5088
    @s-xatya5088Ай бұрын

    Is there any plugins that allow to move/rename file then it will automatic update the import path code?

  • @frederickmichaud6783
    @frederickmichaud6783Ай бұрын

    Cool plug-in. Can it work on permissions?for example, make a file executable chmod +x?

  • @mjaysmileofficial

    @mjaysmileofficial

    Ай бұрын

    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

  • @teej_dv

    @teej_dv

    Ай бұрын

    ya, I think it would be possible to do quite easily

  • @nasso_

    @nasso_

    Ай бұрын

    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 .

  • @cpakkala
    @cpakkalaАй бұрын

    So it's like "dired" for emacs, only not as evolved.

  • @akshettrj
    @akshettrjАй бұрын

    Lessgo

  • @teej_dv

    @teej_dv

    Ай бұрын

    MORE GO

  • @nasso_

    @nasso_

    Ай бұрын

    batgo btw

  • @SyedMSawaid
    @SyedMSawaidАй бұрын

    Is that what they mean by oiling up?

  • @jacderida
    @jacderidaАй бұрын

    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.

  • @SiddharthPant
    @SiddharthPantАй бұрын

    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.

  • @iamreinder
    @iamreinderАй бұрын

    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.

  • @Luclecool123
    @Luclecool123Ай бұрын

    Me when I have been using VIFM for years...

  • @emiliano19746
    @emiliano19746Ай бұрын

    I prefer floating telescope-file-browser but oil is really good, nonetheless

  • @rib9985
    @rib9985Ай бұрын

    So basically nvimtree but in buffer with command access?

  • @SPYFFzero
    @SPYFFzeroАй бұрын

    What happens inside a git repo? Normally mv means delete+new file, not the same as git mv

  • @RegrinderAlert

    @RegrinderAlert

    Ай бұрын

    Git mv does the exact same thing but also the staging (git add) for convenience. So indistinguishable results.

  • @ficolas2
    @ficolas2Ай бұрын

    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

    @billeterk

    Ай бұрын

    Tea tree oil

  • @ficolas2

    @ficolas2

    Ай бұрын

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

  • @lukaszm9234
    @lukaszm92346 сағат бұрын

    how did you add "example" to every file like that?

  • @no_name4796
    @no_name4796Ай бұрын

    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

  • @Argletrough

    @Argletrough

    Ай бұрын

    have you tried using :b to select buffers by name?

  • @ArtMoskvin
    @ArtMoskvinАй бұрын

    How did you rename all other files 4:00? It could be done using :normal but I can't see you typing it.

  • @luckyLaserface

    @luckyLaserface

    Ай бұрын

    I think he did ctrl-v for blockwise visual mode and then GIexample-

  • @elliotalderson6609
    @elliotalderson6609Ай бұрын

    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

  • @FlyingCable98
    @FlyingCable98Ай бұрын

    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

  • @teej_dv

    @teej_dv

    Ай бұрын

    I really like the mini plugins, I will check out files

  • @TehKarmalizer
    @TehKarmalizerАй бұрын

    I have a list of plugins to add and play with, but no chat pressure to rewrite my config.

  • @mohitkumar-jv2bx
    @mohitkumar-jv2bxАй бұрын

    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.

  • @yochem9294

    @yochem9294

    Ай бұрын

    > just like i treat my whole life as a text buffer. Saying this is the most Vim thing ever, definitely gonna steal it 😂

  • @mohitkumar-jv2bx

    @mohitkumar-jv2bx

    Ай бұрын

    @@yochem9294 steal away my friend. Spread the word 😂😂

  • @micycle8778
    @micycle8778Ай бұрын

    Can oil move files between folders?

  • @vsz-z2428

    @vsz-z2428

    Ай бұрын

    yea!

  • @guillemgarcia3630
    @guillemgarcia3630Ай бұрын

    I can finally move off nvim-tree!

  • @edwinnnn7782
    @edwinnnn7782Ай бұрын

    How did you do that example thing in 3:59

  • @luckyLaserface

    @luckyLaserface

    Ай бұрын

    I think he did ctrl-v for blockwise visual mode and then GIexample-

  • @edwinnnn7782

    @edwinnnn7782

    Ай бұрын

    @@luckyLaserface thanks, I think I learn something new from neovim everyday lol

  • @ambuj.k
    @ambuj.kАй бұрын

    I need lotion.nvim for my arch bros.

  • @jerrygreenest
    @jerrygreenestАй бұрын

    3:57 it's so weird to see multi-cursor without actually multi-cursors and it's just applied after the fact. Still powerful tool though

  • @quieneemi
    @quieneemiАй бұрын

    three videos in a row?! Additions? Oil?? Watch now

  • @teej_dv

    @teej_dv

    Ай бұрын

    (don't tell anyone but two more still coming this week)

  • @arjunsahlot
    @arjunsahlotАй бұрын

    I think instead of :e! you should be able to just press u to get the original directory back

Келесі