 One of my favorite things about VIM is that it is very very extensible. There are Thousands of different VIM plugins out there that will make them basically into whatever you want it to be. You want it to be a full-blown IDE You can do that. You want it to be a replica of Emacs because you want to have some of those cool fancy Emacs features But you don't want to use Emacs. Well, you can do that. There are VIM plugins that allow you to get org mode That allow you to get dear Ed to get any number of things from Emacs if that's what you want to do if you want to Start working on websites and you want to have VIM plugins to help you with your HTML and CSS There are a ton of different plugins that allow you to do that if you are a Hardcore programmer and you want to get into Rust or C++ or assembly or whatever You can find plugins that will help you do the things that you want to do It's one of the coolest things about VIM for sure. However, there is a downside the more plugins you have The more likely it is that VIM is going to slow down It's going to bog down because it has a ton of plugins attached to it So what I thought I would do today is actually talk about how you can use VIM without any plugins at all Now you're not going to get any of the cool features There's no way to get Emacs without some plugins or coding it yourself I suppose you could put all those features into your VIM RC yourself because that's basically what plugins do but out of the box There are some things that you can do to VIM without extending it at all that makes it make it much more usable So today we're going to take a look at some of those features So before we jump in if you'd hit the thumbs up button, I'd really appreciate it really does help the channel I think since I started asking for thumbs up. I've done this way more often than I had ever done previously in my entire life So go me this guy thumbs all thumbs. I don't know. Anyways, let's go ahead and jump in. Let's take a look at VIM So if we take a look at stock VIM, it looks like this There's nothing special. There's no line numbers. There's no highlighting. There's basically nothing going on here Now VIM can look a little bit different depending on what distribution you all you are using because some distros do some customization for VIM out of the box and they don't always put that customization inside of the VIM RC file in your home directory Sometimes they put it in some other location and you may not know about it until you start creating your own So just keep that in mind that yours might look different than mine out of the box It doesn't really matter the same concepts apply overall so what are we gonna do here to make them more useful because Honestly out of the box VIM is very useful without anything being done to it. You still have insert mode You still have visual mode. You can still do macros. You can still do All sorts of thing with them without any extensions without any VIM RC whatsoever You can basically do whatever it is that you want with VIM and not do anything inside of a VIM RC However, there are a few settings that make them just a tad bit more Comfortable to use and that's what we're gonna look at today So let's get out of this and actually VIM into VIM RC and as of right now I have nothing in there. So the first one we're going to look at is set no compact Ible like so and basically what this is going to do is it's going to prevent them from creating funky characters whenever you hit the Arrow keys while inside of certain modes Sometimes when you hit the arrow keys and VIM and you're in a certain mode It might leave a artifact of some kind this right here just prevents it from ever happening on you Okay, it does some other things as well. It just prevents them from doing some wonky things I usually have it in every VIM RC that I've ever had So it's just probably the first thing that goes in most configuration files The next one is self-explanable Tori. So we're gonna do set Number and that's basically just going to enable line numbers. Okay, you can also do relative line numbers as well If you wanted to do that the next one we're going to do is do set and yes, I know you can do these all in one line I'm just gonna split them out so that they look separate in the video You can do them all in one line. So just set and then the options one right after another That's one way of doing it or you can do them on separate lines However, you like the next one is cursor line Like so and basically what that one does is it just highlights the cursor It just highlights the line that the cursor is on that's basically all it does now Out of the box. This doesn't look fantastic to be honest with you It just kind of underlines the entire line So if you want to customize how that looks you can do that It just requires some extra work. So the next one we want to do is do set Expand tab just like so what this one's going to do and this is not going to be for everyone But basically what this does is it converts tabs to spaces So there's a war going on then you may not have known that it's going on because there's there's two sides to this war And they're not very loud people, but they're they're having a disagreement very heatedly Some people really like when you hit the tab button you get a tab Some people when you hit the tab button you get a space they preferred that way So which side of that war you're on really does depend on where you're at in your life I guess I don't know but the point is is that some people like to have tabs some people like to have spaces and This one this particular setting here Allows you to have spaces instead of tabs I'm on the spaces instead of tabs side of the war simply because it gives me more options But honestly I could go either way So just know that you don't have to have this one if you prefer to have tabs You can just completely ignore this line here. So moving on to the next one. We're going to do set H L S E A R C H So H L search and basically what that's going to do is that when you search for something by default Then we'll only highlight the first or the closest Match for that search with H L search enabled it will highlight all of them. They just makes those Matches kind of stand out a little bit better So it allows you to see the things that you're searching for a little bit better So the next one I'm going to do is do set tab stop equals to now This one here is only usable probably if you don't have this line here So if you're using tabs, you'll want this line if you're not using tabs, you won't be able to use it as far as I'm aware Basically, what this does is it tells them how many spaces to give a tab So if you have if you want to hit tab and you want to have it look like it has two spaces You can do that you want to have for I think four is the default I'm not sure about that but the point is is that but you when you hit the tab button It would go that many spaces, but they're not actually spaces They're actually tabs, so we're going to leave that one there even though we're going to leave expand tab as well The next one is shift width like so equals to and this one here sets the number of spaces Inserted for a tab. So if you're using expand tab, you'll want to use this line here to set the number of spaces You get when you hit the tab key. Some people prefer four. Some people prefer two I've seen some crazy people who like six not exactly sure why they want that many spaces But whatever shift width to is the one that I usually use and I don't use tab stop So the next one actually is the last one and that is syntax on Okay. Now by default them does have syntax on At least on most machines, but sometimes it doesn't so what you'll want to make sure is that you have this line here And that's going to give you the most possible chances of seeing syntax highlighting in the most different languages So then does not support every language for syntax highlighting out of the box Sometimes you'll have to go find an extension in order to do that, but it does support many of them So you can use syntax on to get some syntax highlighting in certain situations out of the box I'm not sure what them considers for syntax highlighting without the signs sometimes it works sometimes it doesn't work I'm not sure what those rules are but by putting this in your MRC file. You're going to Have it on in the most available places So those are the settings that you'll want to have if you're not going to use any plugins So this is what all of the changes look like once we've actually saved it and come back in or source that the Marcy file and What you'll probably want to do is change that particular cursor line because basically cursor line just has that underneath line So I thought I'd actually show you how to do that. It's actually really easy So what we're going to do is put a line here underneath cursor line and I'm going to paste this line here So basically what this is going to do is Highlight that cursor line in blue So I'm going to just save and quit this and we'll go back in and as you can see now I have a highlight That is better than no highlight at all I think and there are many other things that you can do with the cursor line So I'll leave that to you to Google, but this will get you at least part of the way there So it's not just an underline the rest of them work just as as you'd expect So let's we'll go ahead and go into insert mode if I hit tab You'll see that it goes over to spaces and those are actually spaces instead of tabs So that gives us that shows us what shift width does and expand tab The tab stop here is not actually doing anything because we're using spaces instead of tabs The syntax highlighting looks exactly the same as it did before But that's just because we're still in those of them are the VRC And it's not going to add anything extra special for that unless we go to a different language Numbers obviously are along the side. So we have line numbers So if you wanted to do relative numbers, you could do relative numbers as well That's very easy to set up the highlight search. So if we actually do a search here Oops, we're gonna actually have to get in out of insert mode do search So we're just gonna search for the number two and as you can see now Both of the instances of two are highlighted instead of just the one So those are the few things that you can do to make them a little bit more comfortable to use out of the box without resorting to plugins And honestly, there wasn't a lot of work there. It was just a few extra lines and your VMRC file All of a sudden you have line numbers and you have a better search You have the tabs turned into spaces, which is the proper way of doing things And of course you have syntax highlighting enabled across the board instead of just in certain situations So just those few little things makes them even better and you don't have to resort to plugins So if you have any extra things that you'd like to know about this stuff, leave those in the comment section below I'll try to answer your questions or if you have thoughts on this comments in the comment section below If you haven't already hit the thumbs up button I'd really appreciate that if you can follow me on Macedon and Odyssey those links will be in the video description You can support me on patreon at patreon.com slash linux cast Thanks to everybody who does support me on patreon on YouTube because they're all absolutely amazing without you The channel just would not be anywhere near where it is right now. So thank you so very very much for your support I truly do appreciate it. You guys are awesome. Thank you so very very much for your support. Thanks everybody for watching I hope you have a wonderful day. Hope you're staying safe and that you're happy. Have a wonderful day I'll see you next time. I know it's very very Happy happy there at the end. So thank you so much for watching and my words are not going in the right direction anymore So thanks for watching. I'll see you next time