Check out a free preview of the full VIM Fundamentals course
The "Course Overview" Lesson is part of the full, VIM Fundamentals course featured in this preview video. Here's what you'd learn in this lesson:
ThePrimeagen demonstrates how to access the help menu, discusses abbreviations that will be used in the course, and gives an overview of the course. A student's question regarding what types of development can be done in vim is also covered in this segment.
Transcript from the "Course Overview" Lesson
[00:00:00]
>> So there is a Help menu, like I said, you could always just type in help, it will try to get you into the best place colon help. If you find yourself lost, read the friendly manual as they keep telling me over and over again. I believe that's what rtfm stands for.
[00:00:16]
I'm pretty sure it's read the friendly manual. A motion is anything that moves your cursor. This is taken straight out of the help document. So anytime my cursor moves, I have performed what is referred to as a motion. I know that's a little bit weird, but it is what it is.
[00:00:33]
There's also gonna be some weird abbreviations that I'll use from time to time. One like ctrl+a, I'll abbreviate it like this, which probably looks a little bit funny where it has a capital <C- a> and it has brackets around it. The reason why I will be abbreviating everything like that, is that vim has its own editor language that you can kind of set it up and make it the way you want, and that's how you actually type it in the editor.
[00:00:59]
So just to kind of make it so it's easier to remember, I will always be saying it properly, but it will be displayed as C- a for control a. Enter is abbreviated as <CR> carriage return, I believe, or maybe it's something completely different. But I just always say carriage return, tab, escape, space, you can actually just display them as these little bracketed characters space, escape, tab.
[00:01:21]
And when you see anything that starts with a colon, it means it is a command, all right? And you'll get more familiar with these things. Honestly they'll get easier as time goes on. I just want to make sure that at least we cover the language I will use, so it feels easier for everyone.
[00:01:38]
All right, so I hope everyone here is ready. I'm very excited, I hope everyone else is really excited. I just love the experience. I know that's kinda seems silly, but it's just something that I just can't stand how great it is. And when I learned something new, it feels exciting.
[00:01:54]
Because I'm like learning something that's gonna make my day to day life better. I'm gonna be faster, I'm gonna have better understanding. In fact, it's just magical to me. But, do we have a question over here? What kind of development can we do and then, and is it better suited for some than others?
[00:02:11]
Well, here's the deal that I like to kind of operate with Vim, is everything but JDK. That's my general kind of rule, is that IntelliJ is just so good, when it comes to working with Java, or any of the kind of JDK environment. But I tend to use it just for that, even though niobium has a lot of tools that are being developed and it's getting better all the time.
[00:02:32]
It's just hard to compete with IntelliJ on that one aspect. For me any language that has a language server and LSP, a language server protocol, if it has that, Vim can use that. Every major thing has plugins that will give you autocomplete, they'll give you jump definition, find references.
[00:02:50]
It has everything that every other editor has, they're just usually formed in plugins. So Vim itself won't have them specifically, it'll have some built in ways you can do them via c tags. I won't cover c tags, they're largely defeated due to lsps. There's some still some use cases for Vim, but in the end, vim can be used for pretty much anything.
[00:03:10]
But like I said, generally recommended for Java or a generally recommend something else for Java, just cuz of how complex it is, just better experience, right? But I do wanna remind everyone, this is a journey, it's not a day trip, this class is gonna be over some set of hours.
[00:03:26]
But to be good at Vim, you can't get good in a day. You can't get good at virtually anything with a computer in a day. You have to look at it as a long term item. And the hard part about Vim is that the journey is uphill. Just like when you first learned your first language on a computer, if you've been developing for a while, if you remember that moment of how confusing and hard it was.
[00:03:48]
Cuz you're both learning the syntax and what the syntax means at the same time, it's really hard, those first little bits. And it's just like that with Vim. It is hard to begin with, because you're just trying to reprogram your brain to do something that feels really unintuitive, right?
[00:04:04]
It feels normal to go, I wanna go to this part of this code. So I'm gonna use my mouse, I'm gonna scroll down, I'm gonna highlight and select it, and I'm gonna copy it with Ctrl C, like you're used to that. That makes sense, because that's what's always around, it's momentum.
[00:04:19]
But Vim offers a completely new way, and it's just different, but trust me, it's way better. And the last part is the top of the mountain, it's awesome, right? Like any good journey, the top of the mountain is incredible. And I may be at the top of the mountain right now, but I'm still only halfway up, and so, don't ever stop.
[00:04:37]
Yes, I did just quote Dr. Disrespect, let it happen, but the deal is that, even though I feel like I'm at the top, I never want to stop that desire to learn. That desire to think that there's still more even if I can't see it, there's still more out there, and I don't want to stop now.
[00:04:56]
Like I said, for the live class, I do stream on Twitch, asking questions, those kind of things. You're not gonna confuse me, you're not gonna stop me, I'm not gonna get my train of thought lost. If you have stuff and I do question part, feel free. Trust me, it's only gonna help people, it's not gonna hurt me.
[00:05:13]
And there's really no dumb questions about Vim, cuz Vim it's just so much different than your standard thing, that everything feels new and unique. I also have some Github projects set up. So the first one is this Vim fundamentals. You can click through that, I believe we can get the actual link in the chat, that will be for the Github project itself.
[00:05:33]
But there's also gonna be a second one called Vim nav playground. That one you should clone down, I will have another spot where I say, hey, everyone, let's clone it down. But just so know, get ready to jump on Github, clone it down, it'll be very useful if you follow along and do the actions with me.
[00:05:48]
You don't have to, but once again, you're not even walking on that, you're not even taking the day trip. We got a long way to go, so just follow along if you can. And lastly, we need to clean the environment, meaning that, if you use Vim now, we want to remove everything that you've set custom in Vim.
[00:06:06]
And I'll go over that here shortly, okay? Yes, so the question is, is like, am I gonna map out what's kind of in Vim? I know there's plugins, but also what about like Vim specific items? Earlier I did talk about how I started by learning just the motions and IntelliJ, we're gonna kind of take an inverse approach to this.
[00:06:23]
In other words, we're gonna learn about Vim and I'll show you some motions. I'll show you how to use them, I'll show you how to walk around, but we're gonna learn the components of Vim, and also how to use them or change them with plugins. So we're gonna hopefully cover everything.
[00:06:36]
I haven't tried using many of the Vim plugins in VS code. In general, how I think about it, is that VS code has its own environment and has its own plugins, its own methodology, its own way, besides for the Vim motions, which is very valuable. It's a great stepping stone.
[00:06:50]
Like if you want to get into Vim, but you're like, holy cow, when I open it, I have no idea what's happening, I get it. A great place to start, which is the place I started, use my favorite editor, use Vim mode. Get familiar, become as productive with just using the keyboard, and then I made the jump myself.
[00:07:08]
I actually became more productive using the keyboard, and eventually, I made the jump. I also stopped programming Java at that point, and started doing C++, and TypeScript, and other languages, and it works fantastic for all those. And so that's kind of like the general, I'd say recommended approach, because there's so many options, and because there's so many great editors out there that have so many features.
[00:07:29]
It just makes sense, we live in a world where Vim is off to the side. So, totally start with the plug in, and slowly make the transition, if you even want to make the transition. If you don't, the editing speed gain you will get by just learning Vim motions is incredible.
[00:07:45]
There's so many things you can do at such crazy rates, it's straight bananas. That's a good question. So the question is, all right, so there's a lot to learn. Even just me saying the terminology, some people are like, okay, what was the thing? Well, there's a lot to it, there's a lot of stuff to learn, and it can definitely feel overwhelming.
[00:08:06]
Like I said my first hour of using Vim, I swear I was gonna have a panic attack, because I couldn't move as fast. I just wanted to use the mouse, I just wanted to do all these things, cuz it just didn't feel normal and there's so much to remember.
[00:08:21]
And I had to think about what I was going to do, instead of doing the thing I wanted to do, and that is just very normal. Here's the deal, just try to take it in slices. After today, you'll have a bunch of ideas of what is available. You may not be able to kind of codify exactly what they are in your head, but what you can do, is simply re-watch apart, or just take like say your basic motions, and get good at them.
[00:08:48]
And then, just add a couple more motions in, add a couple more emotions in, and then just slowly get better at editing. And then, learn a little bit about this, re-watch that, go read about it, and just take small steps, cuz if you try to do it all at once, honestly you'll be confused.
[00:09:04]
It is kind of confusing doing everything at once. I like kind of progressive learning approach, or I learned the basics and then just slowly later on, a little bit at a time. I think, honestly, that is the best way to learn.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops