Best Neovim File Managers

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back I've tried a lot of different file managers for neovim by my estimation you can break them down into one of two main categories the first category is external terminal based file managers that run in a Neo terminal buffer and the second is file managers implemented entirely in Vim if they are a new plugin like a neovim specific plug-in they're probably implemented in Lua if they're an older plugin a lot of the time they used Python and stuff like that so I want to talk about some of the options here what people are using and what I see as the pros and cons so I want to start off with the external section and basically there's a lot of options here I want to start with Ranger because this is the one that I actually use so this is my neovim config it's not it's a little messy but I have been using this bit of Vim script for quite a while I actually copied this from some other plugin and I can't remember which one it was but I wanted to change a little bit about it so I ended up just copying this and rewriting a little bit of it so this is what I use and in fact I I don't even use like half this stuff I don't open files in new tabs I could probably delete like most of this it's literally just running Neo and and terminal buffer like that's pretty much all it is just wanted to point it out to say that I am technically using like a custom thing however there are other options that you can use out of the box this I believe is actually the one that I forked mine from so you could try forking this project or using it directly it's not a Lua plugin but maybe that doesn't matter there's also this one here which I believe is a Lu one yeah it's got conf configuration with lazy so if you happen to be a ranger user this is an option now we are looking at Ranger here the reason that I use it is because I use Ranger in my daily terminal life anyway I use it to go between directories when I'm not in Vim so I think just going back to the document yeah so just going back to the document here I think that would be the main consideration if you use one of these tools if you use Ranger or nnn you know maybe you probably want to use a plugin for that so while we're on the subject let's talk about nnn this is another pretty cool terminal based file manager it's very Sleek it kind of reminds me of the commander series of file managers there's one called like midnight commander and there's like a whole bunch of them named like that it's got tabs and you can switch between them and it's a nice file manager nice terminal file manager it's it's a minimal but I like it so this is is a plugin that you could use but if we look at nnn directly here is the project itself and this guy actually makes some really cool stuff on GitHub he also has this this bookmarking tool that I tried using for a little while so yeah this is nnn this is a video on the read me so you can kind of see how it works here so there is a bunch of other options other than this this is just the tip of the iceberg people use all sorts of terminal based file managers and there's other plugins for them so I would recommend if you currently use one of these then maybe you want to continue using it in neovim with a plugin but if you are not currently using one of these I would probably not start using it I do use Ranger I probably wouldn't start using Ranger today if I started using neovim today I would probably instead use one of the options on this side of the chart which are likely to be written in Lua if they're new and you can see I've sorted them on a tree to not tree Continuum and basically what I mean by that is if we look at one of the more popular options here envm tree so here is envm tree and as you can see it is a tree it's a sidebar basically I don't know how we got to calling them trees in neovim considering in most other editors they're probably called a sidebar but that's just what neovim people call them so these are all like sidebar file managers when I started using neovim I came from using Sublime Text and Sublime Text has a sidebar file tree so I did use a similar one to this it was back in the day I was using nerd tree which is a really popular one back when I was using Vim before I was using Neo I think it was written in python or something like that and a lot of people use that back in the day but I would say this one is probably the most popular luab based neovim tree file manager out there and I think this could be a good option for you if you are coming from another editor where you want to see your files on the side at all times then this could be a good option there's another one that's pretty popular called Fern if we go back to my diagram here you can see I kind of listed this a little bit to the side on the tree not tree continuum and that is because as far as I'm aware this is a very configurable project and you can kind of do multiple things with it you can have it act like a true sidebar or drawer as they call it I guess that's another word for it like a drawer or you can have it in a split like this it's kind of hard for me to recommend one or the other like Fern versus envm tree I think they're both really good if you want to use a sidebar or anything like that just try them both out and see which one you prefer now it me mentions netrw here netrw is the default file manager that comes with neovim it comes with Vim too that will be what you get by default if you just try to explore a directory in Vim without a fil manager plugin setup and net RW if you don't know has kind of a I would say a poor reputation in the Vim Community it has a lot of weird features I don't feel like it's had a lot of stuff added to it recently I don't even know how that works with like maintaining the original Vim stuff in neovim I don't even know what they're doing with that but anyway yeah it's like an older plugin I don't think a lot of people are going to be super jazzed about using it if you really want to have a super minimal Vim install you want to try to do as much as possible without plugins net RW may be the answer for you or if you're like jumping into SSH you know going into other servers all the time maybe it's worth it to Le net RW so on the tree not tree Continuum I feel like it's kind of in the middle cuz I think you can make it act like a tree if you want to or drawer or sidebar but you can also do that split window thing with it and then finally well I want to talk about all these other non tree file managers kind of together so this one is really popular today I had another video where I talked about it a little bit a lot of people have been trying this out recently oil is based on another older Vim plug-in called vinegar and the whole idea behind this kind of series of plugins is that they are fully on the right hand side of the tree not tree Continuum they are not trees they are just a single window of your files if we come here and we grab oil and I'm here in my config We'll add it close to where well we'll just add it anywhere here so if I add this in and reload my V config what we can do is make this a config function and then we will make sure we require it and then we'll set the key map and we will set it to hyphen and that is actually like a convention that was set by that Vim vinegar plugin I showed you earlier so I'm going to comment out my Ranger setup and I'm going to reload the oil setup and now if I hit highin now we open into oil this is what oil looks like assuming you've got the dev icons turned on so oil Works a little bit differently it's not a tree instead we get one directory at a time and to go up you hit that same command this hyphen command to go up to the Parent Directory so when we're editing a file we'll hit hyphen and it'll bring us up if we want to go up a directory again we hit hyphen again and then we go up another directory I could go up and then go back into envm go into the L directory go into my modules open up one of my files and then I could edit it go up up go into a knit. Lua that's basically how you edit stuff or how you move around in oil this is not like oil specific that's kind of like how all those plugins work oil specifically has a bunch of cool features around editing the buffer the really cool thing with that is if I go into oil let's say I want this to be a Javascript file instead of Json I can just hit a to go into insert mode change it like I did and then if I just save the buffer with uh colon right colon W It'll ask me do I want to move this file and I say okay and boom that's it basically you can just start editing this buffer just like it's any other buffer and then save save it and your changes will you know just magically happen it'll just work so that's one of the nice things we'll set this back to a Json file so that's one of the nice things about oil you can kind of interact with it just like it's a buffer so yeah there's a bunch of other features here it can do a bunch of other stuff you know read through the docks it's it's a really cool plugin I really need to break my Ranger muscle memory cuz I really really like oil and I want to use it more I'm just so used to using Ranger for so much stuff I really got to do it cuzz if I was starting neov today I would totally use this plugin now there's one more thing I want to show you that's very similar to oil and that's mini files now I'm just going to show you the video cuz I think you'll kind of get a good idea of how it works but if you look up at the top left here this is how it works basically it's kind of like oil but we don't get like a full window takeover instead we just see the directories at the top it's very kind of lightweight way of looking at your files and like oil you can edit the buffer you see how they're doing that there you can make new files you can do whatever I've really been wanting to try this one out you know what why don't we try it out you know we'll just do it live I've never actually tested out any of the mini. envin plugins actually so this will be my first so we'll give it a shot live so it looks like I can just copy it in like this and resource my config now the question is what is the key binding to open it okay it looks like we need to run this command so we just run a Lu command to open it I'm going to bind a key to open that so we'll remember to require it like that and then we'll add a key binding we'll use the same hyphen key binding but we'll make it call this Lua function in instead we'll save the name of this so we use it like that except we need to change it to be like that okay that looks good and okay so now when I hit hyphen I get this little thing here and if I look at the docks looks like we can go up and down with JK and then l and H to go left and right wow this is pretty cool looks like there's a little help here so that's how we close go in entry interesting so then we open this file I had here and then we can go in a different directory yeah this is pretty cool I like it I am pretty used to having like just a direct window open up so I don't know exactly how easily I could get used to this floating window thing but I do think it's cool I feel like it's a really hard Cell between this and oil like if you're getting started with neovim right now you got some really good options and I feel like this is a it's a hard pick between the two of these that's mini files basically it's very different but it's really cool now I just wanted to make some quick honorable mentions I guess so one is there's a couple other like tree plugins that I know are popular nerd tree is like the Old Faithful I'm sure some people still use it but there's also this one which I assume is by the guy that made the Chad and Vim distribution I've seen some people use that a little bit there's also this one l. envm I I think this is similar to like mini files and that you can do floating windows but it's you know like mini files it's all written in Lua so this might be one to check out for you one more honorable mention here LF I know this is another popular like external terminal kind of one that is written in go as far as I'm aware and I think LF is kind of similar to Ranger and that it has those columns this might be an interesting one for you to try out if you like the look of Ranger but you really like go or something I guess I don't know the really honorable mention I wanted to get to was this one here telescope file browser this one I've seen a lot lot of people talk about on the subreddit I'm not like a huge telescope user I don't use it a whole lot the people that like telescope really like telescope Andrew from the future coming at you live you can't go wrong with most of the plugins we looked at today I think they're all good options but file managers are fun it's fun talking about them it's fun talking about neovim together so I'm glad you took the time to watch this video to the end if you like it and you want more content please like the video and subscribe that would be fantastic and thanks for checking it out
Info
Channel: Andrew Stewart | src_rip
Views: 982
Rating: undefined out of 5
Keywords: neovim
Id: TwPgHgPsJXg
Channel Id: undefined
Length: 15min 17sec (917 seconds)
Published: Sat Jan 27 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.