Navigating your files with Neovim and Ranger

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys in this video we're gonna be integrating Ranger into neo FEM this has become quickly my preferred way to move around my file system and definitely move around my file system when I'm at vim without having to leave vim so I'll just give a quick demo I'm like what Ranger is Ranger will let you move through all of your files like so you can kind of like go to pictures right and I'm gonna make sure that we have image preview in there so you'll be able to preview your images in vim which I've never found really a good way to do before now so and there's all of them key bindings in here too so I'm personally J&K to like move up and down so that's Ranger so let's get started as always every single command that I run in this video will be over on my blog I'll leave a link in the description if you haven't yet installed Ranger you can do so in the following ways here at the top for the cool icons you're gonna want to install Ranger dev icons and so you just run this command which just clones this guy's repository Alexander something Ranger dev icons and it'll clone it into home config Ranger plugins Ranger dev icons alright so after that you'll be able to add this line to your RC kampf RC kampf I'll go over in a second it's your Ranger configuration but you'll be able to add this line this default line node dev icons so that you'll have cool icons in there too this only works on Linux for the image support so if you want image support it's gonna be fine it's gonna work on Mac and I think even just regular image support works on Mac and I term too and stuff like that but the thing is I don't think it'll work in neo vem because in nee of em there's it does some weird terminal magic inside there so it's not using like your same emulator something like that so I don't think that you'll be able to preview images in Mac inside any of em you'll still be able to do it with vanilla Ranger so you still get that benefit and that's what Huber's ugh is your bruise oak is a way to like provide image support for a ranger anyway so for Ubuntu you can flip and install it and for arch I recommend installing the latest version of get right and I even left a note for the people and a boon sooo that you should probably be installing this thing from source because when I last tested it not installed from source it moved the it you could still display the image but it kind of moved it pretty off-center which was not good so yeah and hopefully the guy from ubers up gets that up and merged into his latest release in Pitt so Ranger config file let's create one well I already have one created but what you'll do is you'll MK d r dot config Ranger so make a Ranger config right and then here I'll even go to mind Ranger my big text ok good anyway so go inside Ranger and what you should see is after installing the plugins we should be able to go into plugins okay there's my Ranger dev icons and then you'll have this RC comp and if you're interested in mine mine's basically just the copy and pasted version of the one that they give you I got it off of someone I can't remember and mine's like long but you don't need everything that's in mind if you do want mine and I'm just cutting it out right now if you do want mine then you can head over to my my git repo I think of my doubt files it might be up there so you'll create this file this RC comp which is what I just cat it out here and what you'll do is you'll at least put these things in so set preview images equals movers of default line mode def icons we went over that a second ago and I like to see my hidden files if you don't like to see your hidden files don't set that so add that to our c-calm the next thing we'll do is add the Ranger plug-in so now we can go back to any of them and if you've been following along with this tutorial series here then you know that we add everything all of our plugins to this vin plug directory we go inside vim plug and we open up plugins and so I have an entry spot for Ranger here and this is Ranger but the guys calling it our env I like our and zimmer or something like that so yeah it could have maybe done a little better job with the name but other than that it's a great plugin like there's other Ranger plugins but none of them are as good as this one in my opinion once you get it running so the next thing we'll do is create a config file for it so let's go back here and if and we put all of our config in this plug config directory and so the IMR and now what we'll do is just add a little bit of configuration just like simple stuff because I think it works pretty well out of the box I don't really need anything special with this I just kind of want it to take over for now our W and I haven't tested that this works yet so hopefully this works and then also I want to be able to toggle it by pressing space R so yeah and then what we'll do is we will source this in RM all right now you may need to run this R and V IMR sync command at the bottom of like in vim I didn't have to run that and everything seemed to work fine for me so let's see if it works No do well a good first test would be like this all right awesome see so I open the current directory and it opened right up so that's already pretty cool so now we can open files and I'm just pressing L to open files I think and press ENTER to to open a file and it'll just open directories with L and files so we can like open this one it'll open it in another tab if you want to get rid of it you can press Q if you want to start it back up again space R because we just put that in there so it's really really really really fast and snappy it's like wake up anyway something else that will get if we installed uber zouk and it actually works for you then what you can do is go to let's go somewhere where those images go to pigs go to wallpapers and then inside new of em itself you'll get these nice image previews which I don't see many people being able to do in the of em and I really like this so yeah it's kind of a demo just for how it works it's definitely my preferred way to get around my file system for sure so the other thing I wanted to go over is if this one doesn't work for you maybe I'll Mac it doesn't work one time I feel like it didn't work for me on my macbook that I use at work there is an alternative Ranger plug-in and I'll just go over this one first before I go to that guys the alternatives right here it's like the old one that I think it's been around for a while ago I guess it's still updated and stuff and there's more stars than this one but it works the same way and I know that I have this one working on my macbook at home but this is the repo that I'm using in the video it has the cool floating window support it has all the other cool stuff the RPC communication whatever he's doing with that it definitely feels really snappy and it looks really good so definitely give this guy a star cuz I feel like this thing doesn't get enough recognition and then as always you can follow the development that I'm doing on n vim over on my git repo here I'm probably gonna continue to push up a lot of stuff say over the next few days I'm probably gonna finish by saying a week it'll probably be mostly stable and finished up if you want my old config it's on the stable branch and as always make sure to LIKE and subscribe and I'll see you in the next video
Info
Channel: ChrisAtMachine
Views: 23,559
Rating: 4.9525423 out of 5
Keywords: vim ranger, neovim ranger, ranger, vim, neovim, file explorer, files, buffers, vim buffers, neovim files
Id: 8qfc7Nqd5hw
Channel Id: undefined
Length: 8min 38sec (518 seconds)
Published: Sun Apr 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.