 Okay, this is the first video in a series on Vim. And who are these videos designed for? They are not necessarily designed for someone who is brand new to Vim. I'm not gonna show you the very basics of it, but if you're in advanced use, you probably know most of what I'm gonna show you. So this is kind of for someone who's been using Vim for a little while and wants to advance their skills. If you are brand new to Vim, once you install Vim on a system, most of the time you're gonna have a program installed called VimTutor. So just type in VimTutor in your shell and start up. And basically all it does is it starts up Vim with a text file that is a tutorial that you go through, you follow it, and you end up editing this file based on the instructions and learning how to use Vim right inside Vim with a document in Vim. VimTutor is a great thing for people who are brand new to Vim. Check it out if you are. Moving on with our tutorial. Today we're gonna look at two different things. We're gonna look at how to turn on syntax highlighting for when you're writing out scripts and code, and how to add that to your VimRC file so that it's always enabled when you go into files. So for example, I'm gonna go into a file I have here called test. And it's a basic little bash script that does some things, but you notice that it's not highlighted. The text is green, that's just because that's my default color in my shell. Yours might be a different color, but it's not highlighting different portions of the code, different color to help you troubleshoot errors. And you also, as you know, when you go into Vim, you're not automatically in insert mode and you can run commands. So if we hit shift colon to put it, start a little prompt down here in the bottom left, I can now start typing commands in. And what I can type in is I can type in syntax on. And when I hit that, it automatically highlights this file. And I can start typing more lines, blah, blah, blah, and you know, end map, you know, and it does its best. You can get different themes for different programming languages. Right now we're just using the default settings which works fairly well. But at this point, you know, there's no modification to the file. This is we open up a text file, we open up a script and Vim looks through it and tries to determine what parts of this script are comments, what's parts are functions, which parts are strings, that sort of thing. So if I was to save this and exit out and go back in, you'll notice it's not highlighted anymore. And again, I can hit colon. And at this point, I can use my up and down arrow keys just like I can in my shell to go through previous commands. So I can turn highlighting on. I can go and I can change it to off if I want, for some reason, turn off syntax highlighting. I also wanna mention there is a shorter version of that if I was to go in here, I can just type in syn, synon. So colon, synon, the same as syntax on and same colon, syn, off turns it off. But again, even if it's on, if I exit out of the file and I go back in, it's no longer on. But any command I type down there in that little prompt, I can put in my Vim RC file. Now you may, I have heard of other files on Linux and Unix systems that and or have RC in them. For example, your bash RC file or inside your Etsy folder, you probably have an RC.local file or even an RC folder. RC stands for run command. And it's just commands that are run when that program starts up. So I'm gonna save this. And in my home directory, I have a file called dot Vim RC. The dot means that it's hidden file on Unix and Unix like systems such as Linux. Any file that starts with a dot is a hidden file. So if you go into your file browser, you may not see this file if it exists unless you have hidden files shown. So right now we're gonna type in Vim and that file name. And if it exists, we're gonna edit it. If not, we're gonna be creating it. I already have it with just one line. And inside the Vim RC file, any line that starts with a quotation mark is considered a comment. So I just put a comment in there just to have something in this file for now. But I'm gonna go into insert mode and I'm just going to type in syntax on. And I'm gonna save that file. Now if we go back to our Vim test file or my little test file, our script here, you'll notice that syntax highlighting is on as soon as I go into that file. And in fact, if I exit that and go back into my Vim RC file, you can see that that is now highlighted as well. And highlighting is very important when you're writing out any type of code because it can help you troubleshoot. For example, if I was to come down here, if we were to forget this quotation mark, you notice that all down here, all of these things turned purple meaning that Vim thinks that they're strings for some reason and it helps you go, oh, how come this isn't highlighted in yellow? And you go, oh, okay, I missed a quotation mark there. It's very helpful. And again, Vim has some default highlighting but you can get other templates, if you will, for different languages for very specific languages to help you troubleshoot those languages. But even just the default is very useful compared to just having no syntax highlighting. So again, this video is the first in the series. I'm gonna have more Vim videos coming in the following weeks. So be sure to subscribe, like, share, comment. Go to my website, filmsitechrist.com. There's a link in the description of that. That's Chris with the K. There you can search through all my videos from both my channels. And also, if you like my videos and wanna support me, you can go over to patreon.com forward slash mail x 1000. There's a link to that in the description for a little as a dollar a month you can help support me and my videos, my work here. If you wanna do a one-time support, there's a link under support at filmsbychrist to a PayPal account. Beyond that, I thank you for watching. As always, I hope that you have a great day and be sure to like, share, subscribe and comment.