 Okay, so I've been using Vim as my editor for years, but I kinda kept it very default, which a lot of people say you're not supposed to do with Vim, you know, you're supposed to customize it to your needs, and they are 100% right. The reason I, I'm one of those people, I try to keep things as default as possible so that when I go to a new machine, I'm comfortable with it and I'm not missing out on all the little tweaks that I do. But, you know, recently I just did a series on Vim and it got me more into Vim, and I've spent the last couple of days really just putting a whole bunch of stuff in my VimRC file and learning more about it, and I've done a bunch of stuff that still needs tweaking, but I wanna show some of you today just how quick you can get things done. So I do a lot of interfaces for my programs using HTML and Twitter Bootstrap. So let me just show you how quick and easy it is to create a site. So right now I'm in a directory with nothing on it, nothing in it, and this is the directory, you can see there's nothing in there. Let's make a PHP file or an HTML file. I'm gonna do PHP and I'll show you why in a moment. I always try to do PHP because server-side scripts are great. Anyway, so I'm gonna say vimindex.php. Now, real quick, I hit, and these are my personal settings, which I do have up on GitHub. So I'm just showing you how quick things can be done once you get set up how you want. So I'm just gonna hit comma HTML and I've generated a default HTML file that's basically what I normally use. A lot of stuff is commented out. Those are scripts that I sometimes use, sometimes don't, I'm trying to learn more about them. But it automatically puts me into the title tag here. I can say my site. I can save that and if I switch over to my browser here and refresh, you can see we have this basic site, which is the basic little list here. So let's now go down to the body down here. And let's say I wanted to add a navbar. All I have to do is comma nav and it adds a navbar and I can give the title of the page there. So I'll say my website. And now when I come back here, I refresh. I have a title bar. It says my website up here. I have some dropdown menus. This is mobile-friendly. This is what looks like on a mobile device with the dropdown menus. So far we've got a pretty good page going so far using Twitter Bootstrap. And so far I've typed just a few keys. So let me now go to the bottom of the file and down here at the bottom of the body, I'm gonna hit comma modal and it added in the code for modal. So I can come in here, refresh, example I can hit open and it adds in a little modal message box. So that's great. But the reason I mentioned that I'd use PHP files is because I like to include stuff. So stuff like especially your navigate bar or modals, it's like you're gonna use that same code on multiple pages within your site or application so you don't want to have it embedded in each page because you're going to have to then modify it. Every time you add something to the navbar you have to go modify it in each file. You don't wanna do that. So I'm gonna undo these last two changes. And what I'm gonna do here is I'm gonna split my screen and I'm gonna create a file I'll call it nav.php. And up here I just hit comma nav and I'll save or give it a title here, my site new and I'll save and close that. Now back inside my HTML file here or my PHP file, I can type in, again these are my codes, I'm gonna go III space and it creates a PHP include here and I can say nav and I, oops, nav, I cannot type today, nav, I can even autocomplete that, I can save that, refresh and it looks the same but my code here is a lot cleaner and if I change that nav file, any file that I included in will be changed as well. Again, I can also go down to the bottom here and I can do something like this. I can say III space and now I can type in Moldal and I can autocomplete that file. Did I call it Moldal? Did I create the Moldal file yet? Did I call it Moldal PHP? Let me see, whoops, I keep talking, let's see. I can't type anything properly today. Oh, I guess I didn't create it yet, that's right. I thought I did, talking too much. So let me go ahead and split the screen again but this time I'm gonna call it Moldal.php and here I'm gonna say comma Moldal and I can save that and now when I refresh this, this down at the bottom here, you know, so I mean in real life you probably wouldn't have this button. So what we can do is we can link these options here in the little list here to open up the Moldal. So what I can do now is I can go back up to here and I'm going to say CCC space and I've created a click function and I'm just gonna say A. So anytime an anchor tag is clicked, what are we gonna do? Well, I'm going to go here and I'm gonna type in box. So it's gonna run a box function. So let's go ahead and create that function now. So I'm gonna go FFF space and I've now created a function. My tab completion, tabbing still needs a little tweak on some of this but we'll just say box and in here I can type in my capital Moldal space and I've just toggled my Moldal and when I come here, I can refresh and now I click on any of these and the Moldal appears. I've also can come down here to underneath my list or above my list. Let's go above the list inside the container here. I set up so I can go BBB and hit space and I create a button and when I refresh you can see I have a button there and if I want a group of buttons, I can come in here and I can do four B's and my tab completes a little messed up on that but that's again, I'm still working on this stuff and that's because my file is labeled as a PHP. I need to set PHP files to auto indent like HTML. I need to set the file type is what that is. It's just something I still need to tweak. So I'll call this, oops, button and you can see it looks like another button but I can copy that and it's a group of buttons like so and so I can copy that and I can paste a few more of those and now I've got five buttons going across. Another great thing, Vim also has a built-in increment counter. So let me undo this. So let's say this is button zero, okay, zero and let's say I wanna create a few buttons and number them and in real life you actually would type this into your code, your code would generate it but if we wanted to make a static list of buttons that are numbers, just as an example, what I can do is I can use Q to record a macro. So I'm gonna hit Q and Q again to save to the Q macro and what I'm gonna do is I'm gonna YYP to paste. I'm going to forward over to here and on that number I'm gonna hit control A, control A and increment one and I'm gonna hit Q again. Now I can hit at Q and it runs that code again incrementing number. Now I can just go at, at, at, so I'm hitting shift and number two on my keyboard and if I wanted to make 15 of these buttons, I guess it'd be 16 because they're starting at zero. Anyway, if I wanted to add 10 more of these buttons I can type in 10 at, at and I've added 10 buttons. If I want another 100 of them I can go 100 at, at. Now that's actually gonna look horrible because they're all gonna be on the same line with that so I just made 100 buttons right here. So let's undo that and that's it. I just wanted to show you, you know again, this is something I've been working on for a couple of days. Still needs a lot of tweaks but I can create stuff so much faster than I used to just because I've learned a little bit more about VIM. So I recommend you don't follow suit with what I've done the last like five years I've been using VIM and actually modify it and also people say this and I 100% agree with it is don't just copy and paste someone else's VIM RC file. Look at what they have there and use what works for you. Customize it for your uses. That's what I'm doing for myself and a lot of stuff I'm doing, I actually a lot of stuff I've just showed you. I wrote one way yesterday and then I rewrote a lot today to make it work even better. So I'm gonna continue working on it, making it better. I suggest you learn a little bit more about VIM and the VIM RC file and as always please visit my website. Filmsitechrist.com that's Chris the K. There should be a link in description as well as a link to my Patreon page if you wanna support me over at patreon.com forward slash metal X 1000. Thank you for watching and as always I hope that you have a great day.