Transcript from the "Terminology" Lesson
>> We're gonna go into terminology, so it's a little bit different, right? Some of the things I'm gonna say might mean something to you, but they might not mean the same thing inside of them. For fun up here, I actually linked something right here. If you have the time at some point, check out this video it's actually how files work it's by Live Overflow, pretty fantastic.
[00:00:19] But just because I say the word file, it might not mean the same thing to me as it does to you just so you know, but I'm gonna try to go over everything that will work for both of us. All right, so what is a buffer? A buffer, some people will probably say is a node class that contains ones and zeros.
[00:00:34] You're right, not in this context, but you're definitely right. A buffer in VIM is effectively how I like to think of it is a representation of the file in memory. If you edit that buffer, it does not mean you edit the file directly, you're editing a buffer. When you write the buffer, you are writing that buffer to the file and replacing it with whatever the contents is inside of the buffer.
[00:00:57] You can do help buffer, I'm gonna try to drill this in all the time. There is a help menu for literally everything and so if I were to jump in here and go help buffer. It will give me a bunch of stuff about buffers, commands I can do, all sorts of stuff so it is completely available, remember that.
[00:01:16] A window, a window is simply something that displays a buffer. Now that is pretty much all it is, you can close a window and the underlying buffer can remain in memory but the windows closed you no longer see it. Tabs are like another viewport, it's not like a tab in VS Code where we have a bunch of little files opened as tabs.
[00:01:36] Tab is another kind of viewport into VIM, you can have multiple windows into it, you can have a lot of splits, it's a separate workspace as I've heard some people refer to it as. I personally am not a tab guy, I try to get into tabs, [SOUND] it just, [SOUND] I really want them to workout, but I just ended up just hating them.
[00:01:54] You can definitely explore them see how they feel see what they're like. A split, is simply just splitting a window that's all it is. I can kind of show you a couple of these splits really quickly, so if I were to type in the word new, I actually create a brand new buffer.
[00:02:09] Now this thing is split horizontally, you can tell it's split horizontally by the way it is. In other words, the line is the direction that determines what type of split this is, so this is a horizontal split. If I were to do vino, it would split it vertically, so this is a brand new buffer up this direction.
[00:02:25] It's a brand new buffer on this side that is split vertically, it's by the line, remember that. So every application seems to do it a little bit differently, I think i3 my Window Manager has vertical split the opposite of what it is VIM you just gotta learn what it is.
[00:02:42] So just remember it's the lines the direction of the line. And here's some other terminology that I think is really important, which is, I'll just click into this and we'll just put it up here. All right, so right up here, these are tabs, so if you had tabs open you would see up here a couple tabs, right?
[00:02:59] These along the side are line numbers, you should be fairly familiar with line numbers. The current line you're on is gonna have some sort of extra highlighting to it, it could display the line number. I have a unique setting right here that makes my line numbers look really goofy, we'll talk about that here in a little bit.
[00:03:15] The blinking square is your cursor, that's where your current editing positions at. This big old dark space right here is called assigned column. You can have it dynamically toggle on and off, it can show errors, it can show if you've edited it in the gitgutter, right? But in the end, that's just called the signed column.
[00:03:35] There's also down at the bottom what file you're currently editing. And along with that, also your command bar, or it will show you what mode you're in if you're in a mode that has a display. Now we'll talk about modes and all that here shortly. Can I get out of this thing, there we go.
[00:03:54] And lastly, there's also what is called the color column over here on this side. The color column is something you can or don't have to have on, the color column is simply just a way to mark a certain line number as being too far. You probably have seen this in other editors, I set mine to 80 some people I've met 120, set it whatever you want it just it just is a good way to indicate how far over you are.