Vim Plugins and Tricks That Give Me Super Powers! 🚀

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
  • You didn't explain your rationale for using NERDTree instead of Netrw.
  • Your CoC demonstration is underwhelming to say the least. The completion is not better than <C-x><C-o> and you could get the "auto" in "autocompletion" with much lighter plugins.
  • "I use RipGrep, I think." Sigh
  • Your demonstration of ctrlsf is also underwhelming with that incredibly noisy window where most of the occurrences are invisible and there are silly red rectangles all over the place. Bleh.
  • Why AnyJump when you already have the supposedly smarter CoC?
  • Vim is barely noticeable in that video. Would that mean that the ultimate trick to get "Super Powers!" is to hide it under a bazillion plugins and only use third-party abstractions?
👍︎︎ 10 👤︎︎ u/-romainl- 📅︎︎ May 11 2020 🗫︎ replies

It's all good and dandy to change your vim configuration and add plugins if you find value in those. I'd recommend you took a step back and learned proper vim first. And i don't even mean do what plugins do on default vim, no. Pardon my expression, it's intended as a constructive one. You move in vim like a toddler by the amount of hjkl you use in this demonstration. Learn to use motions properly 1st. I PROMISE you this will change your life more than any vim plugin ever will.

👍︎︎ 2 👤︎︎ u/p4d4w4n 📅︎︎ May 12 2020 🗫︎ replies
Captions
hi there my name is Jeremy and I am a big fan of Venn it's probably my favorite tool and most frequently used tool in my entire computer and I like to joke that I am a mediocre engineer but I really devote myself to my tools so it lets me seem a lot more effective and capable than I actually am and if you would like to live the way that I live then follow along and you will see some cool ways to use them to give yourself some really cool superpowers so you can get awesome work done really quickly it's worth mentioning that this is not an exhaustive overview of what I use film to do I have been using it for nearly a decade now and I've invested a ton of time in configuring it and adding plugins and getting things just right in the way that works for me and it's also worth noting that this is probably gonna make a lot of them purists cringe because I do a lot of non vini things and I make it I sort of bend things to I will because it works for me and it makes sense to me and if you want to be of interest and do things the perfect you know sanctioned way then cool you should do that I that doesn't really work for me so I kind of just make them work in a way that makes sense to my brain but everyone's different so you do you but this is what I do and if you like to go fast like I like to go fast then follow along so first off I'm just gonna show you uh this nice little cow here actually is a nice way to to kind of start your day or any new buffer because I actually have that showing up on any new buffer it's called been certified and it's just a it's just usually boots up when you've launched them but I actually just have an opening up on every new buffer because I like this cow and the philosophy cow gives me motivation to do whatever it is that I'm trying to do also this color scheme is called them mono chi tasty and I realize it's a little bit lame to like a geek out about a color scheme but it looks really nice I mean look at it it's nice and bold and I'm using a Bluetooth font and it just looks very pleasant and it makes want to use them and do work because of it because the colors are so pleasant to look at everything is different on that though it's not necessarily productive it's just fun but more substantively I use a plug-in manager called vim plug to set up all of my appointments so let's take a look at that so I used to certify because I often go to my dog files also for fun I have a little you know explain what all this stuff is later but I've got a little function here called config so wherever I am I can just type a command config and now I'm in my MRC which is really really nice and wanna tweak something and I can just type reload it'll reload my a config which also I have a little function there to just resource my vim files and that's how I can quickly modify my vim config on-the-fly as I go but anyways let's go back to the top here I use vim plug to just kind of plug in all the plugins that I want so I can just type plug whatever the name of the plug-in is which is usually just the github URL - the github comm / part so this would be for instance github.com /t poke slash bin fugitive you type that in you do plug install it would install anything that's not already installed and that's a super easy way to get your plugins downloaded and set up and also if you you're like me you want to you have several machines you want to keep synced up with your with your vim dot files you just put it on github so long as it's shareable and they can clone it down to your various machines and just plug install and it's super handy it's worth noting that like I've got a Windows machine that I also have that I use G them on I use terminal vim here because it's just better for the Mac for me but on Windows I like jevan and it all works the same it's it's a really straightforward way of keeping all your different plugins synced up nicely so just kind of going on the list from like like I guess less fancy too fancy I like my little status line here it's called light line late late mine although I'm fast with them I am NOT a good typist which is not a great combination of use vim but I make it work this I used to use airline and power line and probably something else but I like white light because it's a lighter line it just has less features and I've configured it to have to show like where I am the file and just the basic stuff I don't want all the fancy things that some of the other status line plugins have but again everybody's different just like white lane a lot apparently nerd tree is sort of like a contentious thing in the vehm community that's fine I love it here it is yay a nerd tree also one thing I wanted recently about nerd tree is that once they get it annoyed me for a long time is that if you have multiple buffers so if you had one buffer and you had like say this thing open or you were just somewhere in it and then you went to another buffer and you try to create a new nerd tree if you open up nerd nerd tree toggle it would be a brand new nerd tree instance but you don't actually have to do that I found that it's way easier for me - I think it's nerd tree toggle mirror there it is so you can actually just it essentially gives you one like kind of like one single instance of nerd tree to use for your entire ven session which for me is a lot more intuitive apparently that's not like the proper way to use it it makes more sense to me again you do you I have kind of forced them to be the thing that I need it to be which is not the correct thing but I like it so okay so that's nerd tree I love it take care of it also I wanna so let's say that I am in some random file somewhere so let's say I don't know I'm in a let's go to some random file I want to see where it is in the nerd tree directory I can do try to type let me just find they're fine also this is I've been using a thing called as the F which I'll explain in a minute but it just helps it saves keystrokes but so here's a nerd tree find and it will show you where in your nerd tree you that you are it'll just go right to it which is super handy so that's nerd tree so it's just a great intuitive file tree Explorer and you can also do other cool things with it like you can create new files you can call it like types dot txt or so like that you can open that up and you in a new terminal I like yeah I am a file great so but it's just a really good command line based File Explorer so let's actually exit out of this I kind of forgot where I was um so I'm in this project of mine called farmhand and I'm kind of using to show off some of this stuff so here's a so see us even I'm not sure if it's like van or its Co te'devan but that that's the thing I'm talking about but unless you use language servers which I don't know that I understand language servers enough to explain them but I know what they do for me so they give you intelligence for uh type functionality for your various projects and it works in a very language non agnostic way so if you use something like Visual Studio you you've probably come to really rely on intellisense where it's sort of like Rachel code for you and if you don't see them does the same thing for of him any more abstracted way but it's really great so I go to here I can do say window since the JavaScript project I can get window dot and then I can like kind of autocomplete whatever makes the most sense for me it's not perfect to make some noise and in the in the bottom there what you saw but it usually works pretty well it works better if you're using something like typescript or like a language that actually has static typing work and do more the smart stuff for you I don't work in many typescript projects so it's got limited value to me but I like it and apparently does more things for neo vim I don't use neo of em nothing against it I just have not taken the time to migrate apparent like I tried once in it like 90% of the things worked but I just never took the time to get that last 10% but it's all good it's all been awesome so the next plugin I want to show you is control SF which again I don't know how to pronounce these things because they're like they're named after things that aren't words so controllers have big fan of this so it type it it integrates with a command line searching tools such as like AK or rap or I use a I think there's search or rip grip I forget which one but they all find something I'll do the same thing I think but there's a lot of things it's really used to use it for searching for everything but what I tend to use it for so I want to I just have a type connected to keep bindings so if I'm gonna find say like this this word observe I can do just leader a which I've configured it to do and with so here's all the instances of this word in my code base so let's say what the thing I practically support that's sort of like replace programs function with other things that explain if want to change this word to I don't know a hamburger or something I that's another keep keep I think that's it up or I can just do a quick substitution someone change observed to hamburger I just saved with I I've got saved I got : W maps to leader W so just save it and now it's been updated to hamburger which I don't actually want that on my codes I'm just going to undo it with you say again and now it's fixed so that's just like a really easy way to find replace it in your code base that works for me like 98% of the time you might be something a little smarter for you know for our edge cases but this is just how I do it so now I'm gonna get into my favoritest tool and the whole entire world for vim which is FF which again I don't know how I'm supposed to pronounce that because there's not a word but I think it stands for fuzzy find so f CF will change your life because you probably noticed I have been moving around code really really quickly and that's all f c/f it's by the same person that I believe did then plug I think it is I think it's just not in my my plugins list anyway so SEF is really powerful because it lets you fuzzy find things it's very UNIX e in that it does one thing well it fuzzy finds so a departing the most practical example of how that looks right now is that I got a bound to uh let me just I think it's a slash slash nope one of these there it is okay so these are my two most used key bindings so we've got B lines which stands for buffer lines so if I did slash slash then I can here spike the entire buffer that I'm in it all black and white there's no syntax highlighting but I can just sort of type the thing that I want so I wanted to find all of my plugins there they all are it filters them down in like in real time it's amazing and I can just go to them let's say I wanted to find everything that matched a bin so I do slash slash them and we can navigate super easily we can open it up in a in a new tab we wanted to so here's like you know where that was in the buffer in a new tab and once you kind of like once you turn a gerak FCF it really changes how you think about your work like this is totally change our work it's what makes me fast and efficient not because I know what I do what I'm doing I'm just kind of like I I abused FCF to get work done incredibly quickly and if you thought that was cool just wait until you find the question mark question mark there it is so it's our G which is rip crap but what this does is I can do question more question mark and here is the entire contents of my project so the thing that you just saw that I did now I can do that for my entire project so this is a project for handsome want to say let's say I look for my components I can do components and here's all my components and it wasn't like nice little preview on the right side here unless I want something in my components that has cow so you'll notice that these all there's a colon that separates the file name and the contents of the file love it hard to see here but so let's do a component and then cow so here's everything under my components directory that matches cow and again I can just zip around and light like it late speed and it can get around my codebase and its really powerful because it's so fast and again I can just kind of go open a new tab I can do to a new split it's really a game changer and I would strongly strongly strongly recommend that you use fzf but wait there's more there is another thing I really like it's called beat commits which is commits which stands for buffer commits and practice it's really more of like a file history viewer so I think it uses a vim fugitive or one of those tipo plugins but it's really great because so let's say I want to see the the file history of this particular file is Cowpen J's file so I can just do file history well actually I just want to show you before I also used f2 z f2 fuzzy fine for fought for commands that I can't be bothered to type out so I just do cc and I can just type a file hist which is what I often do he'll hit there's file history and also anything else that you would want to go to and I just hit enter and there is all of the commits that have been done to this file and I can check them out really quickly so let's say I want to see one of this this file is created enter here there is the commit and I can also open up and get up really easily if I did G browse but that will kind of that will that will break my screencast ear so I'm not going to do that right now in any case it's incredibly powerful basically FCF integrated for them gives you incredible control over time and space of your project nothing has made me feel like a superhero more than f c/f so gettin to the end of my list of things i wanted to go over here sorry for the long video but another one that i found recently it's called any jump and it's really great so a lot of IEDs have symbol lookups so if you want to find where function a function was defined there's a lot of tools in II's for that but I don't want to use it they could have the IDE I just want to use him because it is fast and lightweight so I use any jump so if I wanted to say see where everything say like this is a stage title map variables you've being used I can just do leader J and then it shows me everything where it's used so right there and it's really because it actually works across entire project so let's say that I wanted to see where this particular import was being used this this navigation component here they just do any jump so leader J and there's there's where it's defined I can go to that I can do control so to go back to where I was which is just standard vim I can do a leader of any jump again leader J and here's every where it's used to show them all that it's really great because you can also hit you can see the options here below but you can do so you can do P to preview with to give you some context so what that looks like you can invert how it's displayed it's it's a little bit of a newer plugin I think from what I've seen it's not like as robust as some more established plugins but I'm finding that it is incredibly well done and I cannot wait to see where the author goes with this plugin because it's indispensable in my limited time with it so definitely check it out so that's any jump now the last thing I want to go over is not actually a vim plug-in at all it is a chocolate separate thing but I'm a big fan of command-line new eyes for doing things and like a lot of developers I used get a lot so I found this great tool called lazy yet by Jessie Duffield he's got a couple of other similar tools but I've actually got a bound to a keyboard cut to a key mapping and bin so I can just call it instantly so I just had I do leader G this is lazy git it opens up in a new tab and I can just hit Q to get out of it an unpacked where it wasn't them I hadn't left them at all but let me do that again so we're G and so this is lazy get this tools a little bit with this side of this video but I strongly recommend that you take some time to look at it video sometime the creator of it has put an incredibly helpful video on linked up in the readme of the project and he'll do a better better job of explaining how to use it than I have but if you like command line you eyes for things I just a quick overview of what this thing does so he needs your mouse or keyboard I use a mixture of both but you can see all the disks also I have a custom diffe custom pager configured for this there's a great documentation on how to do that it's called get Delta it's really nice it's very fast but you can see like how your projects go to any commit and check it out you can do things like actually staging stuff I don't change this to to make right now but you can stage things and really can and commit them and push them it makes everything with get incredibly easy like then there's a bit of a learning curve but once you invest that additional time upfront it just pays off dividends exponentially over time so I'd strongly recommend that you check out Lee to get check out the video that Jesse put up on the lazy get read me also check out lazy docker I'm finding that incredibly useful and lazy npm which i think is newer and not quite as robust the time of this video but also really cool but this videos got a little bit long so i hope that you like this this is the stuff that makes people think that i have a good engineer when really I just really know how to use my tools very well and I will keep living that lie until somebody finds me out if you also want to live the lie then check out some of these tools I get a link up my files feel free to leave a comment on the video and yeah check it out and have a great day thanks for watching
Info
Channel: Jeremy Kahn
Views: 17,947
Rating: 4.8737864 out of 5
Keywords: vim, fzf, anyjump, ctrlsf, lazygit, nerdtree, command line, git
Id: x8uleL9j5lY
Channel Id: undefined
Length: 21min 4sec (1264 seconds)
Published: Sun May 10 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.