 All right, what's up everyone? So I was doing a little personal work. I've been transcribing this book here And I realized there's a learning moment and we can have a little time to learn about the power of Vim and La Tech combined What kind of optimization it can give me on a daily basis. So this is what I'm actually doing I'm transcribing this book. This book is on Indo-European grammar It's like an old type written book and I just scanned it And so the part I'm doing right now is a text in Sanskrit And it actually comes from the Rig Veda. So there's a text here and you know It has these different stanzas and then it explains the text in a glossary, right? Really, it's it's written for people who don't know anything about Sanskrit or Indo-European languages It explains like each and every word So that's the kind of thing I want to reproduce now. I've already actually written the text out Okay, so that's that part. I don't have to worry about so I already have all this done But it you know, it's a little bit of effort to do all this because you know You have all these fancy characters and you know escape sequences and you have to do all these accent stuff and whatever And for the glossary what I'm gonna have to do If I'm doing this if I'm doing this in word or something like that I basically have to copy and paste each and every word or at least rewrite them for the glossary because each and every one of The words barring repetitions is in the glossary So what are we gonna do to make this super easy in Vim and La Tech? Well, as you can guess, it's gonna be pretty simple. But yeah, well, let's go ahead and get into it Now I'm gonna start I think first I'm gonna get rid of this preview. We don't actually need it But what I'm gonna do at the beginning is I'm gonna highlight all of this text And I'm just gonna copy it into the glossary section, which you can't really see right now because of my Screenkey or whatever but Anyway, so now we have a copy of it now what I'm gonna do with this all of this is I'm going to take it and I'm going to put each and every one of the words on an individual line And that's gonna make it easier. So when I actually, you know, do the modifications on everything But before I do that, I want to get rid of all of these You know double slashes at the end of lines to make new lines because I don't need any of that crap So I'm gonna highlight everything in visual mode And I think the easiest way to delete them is, you know, enter a command enter a normal command And what I'm gonna do is do dollar sign x dollar sign x and that's gonna get rid of the last two characters on each one of these lines So now we don't have to worry about that And I think I'll actually go in and you know delete each and one of these extra spaces just you know for fun Just because you know, I don't know there's probably an easier way to do that. But who cares We don't have to optimize everything, you know, so the next thing I'm gonna do to Actually, maybe I should make this so it's like a little more centered. I don't want to use go-yo because it does have the We'll put this somewhere in the center. Okay, so the next thing Kind of a macro and what this macro is gonna do is it's gonna it's gonna take a word and put it on its own line So I'm gonna start recording. Let's say I'll record it as S So I'm gonna press zero to make sure I'm at the beginning of a line I'm gonna press capital E to go to the in the end of the first word and Capital E is gonna include things like slashes and brackets and stuff like that. It's everything. That's not white space I'm then gonna press a to go into insert mode Delia delete to the you know delete the care excuse me delete the space afterwards They're gonna press return and so that ends me on the next line escape and cued it in the macro So now if we run the macro you should see that it will basically just take the next word and put it on its own line So let's run that. I don't know 50 times. I don't know how many Yeah, so that's gonna run We have left Great. So now this is doing all the work for me. Don't really have to worry about any of this So yeah, now we have all of our words on one line. So that puts us I don't know maybe about halfway there So this is where the law tech portion is gonna come in now What I wanted what I want to do now is I want to have a set like a set way of like defining each of these words So they're all in the same formatting and I think the easiest way to do that is actually have a law tech Macro like a kind of environment you make for a glossary entry in this situation in each of these glossary entries It's gonna have of course the word it's defining then some kind of definition and usually like an explanation of what's going on So they're sort of like three different arguments. We want this macro to have So let's go ahead and start thinking about this So I'm gonna have a new command and that's gonna be my new macro. We'll call it like I don't know gloss entry. I Assume that's not used already And we're gonna say it needs three arguments three, you know because the word the definition and the explanation So where are we gonna put those things? So remember to call the arguments you just use like number sign and then a number so first we'll have Number sign one which will be the actual word then we'll have say a line that goes to the definition And the definition is gonna be in you know parentheses or not parentheses quotation marks And then maybe we'll have I don't know just sort of a space or maybe Yeah, we'll just have like a space and then like number three if it exists and we'll see what that looks like and Oh, we do need to have a new line as well. Okay, so that should be it. So this is gonna be a new command It's gonna be gloss entry. So what we're gonna want to do now is actually first off I want to let's see how many words we have so 66 to okay, so just around a hundred. Okay, great Okay, so what we're gonna want to do is Put all these words in this syntax. So that should be pretty much. Oh, why did I turn my screen key off? Let me turn that back on So we're gonna make another macro and let's say we'll call it G for gloss entry And so we're gonna do capital I to go in insert mode at the beginning of a line and we're gonna say loss entry And then we're gonna open our brackets And of course the word is actually going there so going to go in there So we don't need to change it and then I'll do capital a to get after it and we'll put You know close the brackets there and then I'll put my little guide character So this sequence of characters, you know, whenever I press space space You might know for my other videos. La Tex or yeah, La Tex searches for this deletes it and goes to whatever one's next I'll show you what it looks like later. So now that that's done. We're gonna go escape Go down the line and then we'll just in the macro there. Okay, so now if we run that again We're gonna have great now. It works on the other line. Now if we run it 99 more times. Oh Geez, it looks like it's gonna take forever, but it's going to repeat the macro on each and every one of these entries all 100 however times Yeah, blame the blame the screen casting. That's why it's taking so long But yeah, just imagine typing all of this out though But if you do this on your own computer, it's gonna be pretty quick So you don't have to sweat it too much But as it gets to the end, you will see you will be very happy that you have saved all of that effort So yeah, now we have everything in particular entries. Everything should look pretty fine And we can you know check everything out. It's to the formatting every, you know, the second the definition is in the Quotation marks stuff like that So now we don't have to worry about anything really we're at the point where yeah, we're pretty much all set All right, so final addendum I've go I've gone ahead and started to fill these in just copying the book more or less Remember, of course that you can make changes to the macro. Let's say I want For example, let's want let's say I want the word to actually be bold So if I just throw that in maybe I should actually spell the command right if I put it in text BF Now all of our words are bold something like that if we want, you know extra spacing or something. I don't know So we want a new line or something like that So that's gonna add in a new line. So you can pretty much easily change it So anyway, this is just a minor optimization I'm actually gonna be using this a couple times because I'm not just copying Latin tech or excuse me Sanskrit text But I also have a Latin text the Hittite text Greek text a bunch of other stuff that I'll have to do Thinking of ways to like skimp on typing all this stuff out, but there's not really much of a way of doing it But anyway, so this video is just an example of how you can use vim and la tech or you know You can replace them with whatever extensible text editor you want And you can get a whole lot out of it. So this is this it's not a meme guys It's not a meme so stop pretending. It's a meme because it's not So anyway, thanks for watching. Hope you learned something and see you next time