 I will start recording. I wanted to start with an issue, which I can't remember, Mark or Matt. Somebody pointed out that their paper spaces were broken. Yeah. So anybody else who's been following along probably found the same thing that they couldn't see their notebooks anymore, which is a bit of an issue. So let me start an instance and we can see it create. Oh, and I should share my screen, I suppose. Share screen, advanced, portion of screen, let's go there. Right. You guys can see my paper space window now? Cool. All right. So I delete the workspace URL as we do. Okay. While that's starting up, I'll show you the other thing, which is I mentioned the other day when we were talking about how do we create bash scripts. For example, we created that bash script run.jsh and gradient. And I said, oh, you know, you can use the Jupyter text editor if you want. But that's not how I would do it myself. And I said, I would show you how I would do it myself. And the way I would do it myself would be using a program called Vim. And Vim's a text editor, which has a, you know, somewhat deserved reputation for being a bit obscure and challenging, but also for being powerful. And all of those things are true. And it's kind of something I wouldn't normally cover in a beginner's guide, but in a guide of like the things that are going to make your life better, I would certainly say, yeah, we do need to include it because it's actually really quite terrific. And but I don't want you to take my word for it. I wanted to give you an example of like how it works and why it's terrific. And so I thought like a good example was one of the folks who's been following along on these, let me just try to make this bigger, see more faces, there we go. One of the folks who's been watching these courses, Daniel, has been kind enough to create these timelines, which I think, you know, actually really useful to like remind yourself of what we covered. And they're useful for me because I can use them to create timestamps in YouTube. So timestamps in YouTube, if I just show you an example, they look, you see how at the bottom here, those little chapter markers appear. And to make them appear, you basically have to have like times in a particular format in the description. So I actually used Vim to turn Daniel's thing into those timestamps. And I thought that might be just a good example of like how Vim's a bit different to your average editor. By the way, you might have noticed when I selected this, I actually selected it quite quickly. And the reason I did that was with the keyboard, like everything, you know, most things I use have good keyboard bindings and the forums have good keyboard bindings. If you just hit question mark, you'll see them. But they tend to be pretty consistent across programs. And you'll see that J and K move the selection up and down. So if I press K, it moves the selection up. And if I press J, it moves it down. And it kind of selects it. And then if I hit E, it edits it. So now I can hit Apple A to select all Apple C to copy. And you'll see that these keyboard shortcuts have a lot of overlap with Vim. And so it's kind of nice that as you do more stuff with the keyboard, you start to realize you don't have to relearn everything from scratch. So I only just set up this Mac. And so I just installed Vim literally before we started this session by typing brew install Vim. You need because I'm using because I'm trying to use a Mac a little bit. And you need to set up homebrew, which you can do from their website. And so when Vim opens, this is what it looks like. It's going to be pre installed. I assume this is now running. It should be pre installed on paper space. So we should be able to use it straight away there as well. It's taking a while to start for some reason. I suppose it's going to do this. It's taking a while for me to. That's okay. I don't have to watch it doing that. So while we're waiting, I'm just going to go back to this one on my Mac. Okay, so here's Vim. So the first thing you'll notice if you start Vim. So if you're on actually, let's talk about different options. So on Linux to run Vim, you would type sudo apt. Actually, let me do it in the Vim window because otherwise it's going to auto complete things in nine ways. So in Linux to install Vim, if you don't have it already, you would type sudo apt install Vim. On Mac, you would type brew install Vim after you've googled for Mac brew and installed home brew. Windows is going to be the same as Linux of course because it is Linux and WSL. And so once it's installed, you can just type Vim at the command line. And yeah, the window appears. And one thing you'll notice is if you start typing, nothing happens. Text doesn't appear. So that seems like a problem, a text editor where when you type, it doesn't put text on the screen. What on earth is going on? Well, it's exactly actually the same as Jupyter Notebook, which is in Jupyter Notebook when it appears. So if I create a notebook, if I start typing, nothing happens either. Right? And that's because in a notebook, you have to click inside a cell or press enter to go into edit mode. And then if I press escape, I'm now in command mode and buttons do things rather than type. So for example, x cuts. Vim is the same. It's modal. You're either in a mode where you're entering an editing text or you're in a command mode. So by default, just like in Jupyter, you're in a command mode. So to go into edit mode, you press I, I stands for insert. So if I press I, and it says down at the bottom here, insert. So now in insert mode, now if I type, it types. And then if I want to go back into command mode, I press escape. And if you don't see a mode, that means you're in command mode. My arrow keys work as usual. And up and down work as usual. But one thing you might notice is in command mode, the same buttons that we use in Discord for up and down, J and K also work for going up and down. And it's not just J and K, it's actually all the letters in a row there are all movement. So J and K go up and down. And L and H go left and right. It's totally fine to use the keyboard, the arrow keys in your keyboard as well. And I would say honestly, probably for the first couple of years of using VM, I always use the arrow keys. At some point, I started using H, J, K, L all the time instead. I guess my fingers noticed they were a bit closer and I didn't have to move. And they decided that they liked doing that better. That's, but I was fine. So yeah, so you can move around. And so at this point, we can run Vim, we can enter text. And then the one thing we, we don't yet know how to do is just, is to exit and save. So I almost never just type Vim. I almost always Vim something. I want to Vim a file. So for example, let's say I wanted to Vim my .Z profile file, which is a, one of the startup scripts that's run automatically when you start the terminal, I would type Vim space .ZP tab. And there, there it is. Okay. And so this is something that Bruce installed for me. So if I wanted to now edit this, maybe I wanted to put a comment above here. I want to go into edit mode. And I'll show you like the slow way to do this. I could press I for insert. I could press enter. I could press up. And I could start typing. So that'd be one way. So I could type my, my comment. Okay. And then press escape. Now I want to show you a different way. So I want to undo all that. So to undo the last thing you did, it's press you for undo and you again. I is not the only way to go into edit mode. There's lots of ways to go into edit mode, to go into edit mode in different places. And one of them is to press O, which opens a new line underneath. So that puts a new line underneath edit mode. I want a new line above, which is shift O. Shift O was a new line above. So it's pretty common that like a letter and the capitalized version of the letter in Vim are kind of related versions of, of similar things. So if I could put a comma here, shift O, auto added by homebrew installer, for example. Okay, that's good. So now I want to save and close. So there's actually a third mode. There's not just command mode and edit mode. There's also a mode they call EX mode, which is where you hit colon. And when you hit colon, our cursor moves to the bottom and you can enter various different commands here. So one of the commands you can enter is W for right. And so that will save. So by default, it saves it to whatever I loaded it as. So it saved it back to .Z profile. I could save it to something else by going W, you know, backup profile or something. And that would save it to that file name. Another useful EX command is Q, which quits. So colon Q quits. So if I now decide I don't want to capitalize that, so I'll change that to a small a. I can, you can combine EX commands together. So to save and quit, you would type colon WQ, right and quit. And so when people say, how do I exit Vim? You'll normally hear people say colon WQ. And that's that's why. And so by the way, that like what I just did there when I changed the big A to a small a, I did that in a single button press. And that's because the the tilde command changes case and moves one to the right. Okay, so this is an example of, you know, when you've got the whole keyboard available and shifted versions available, like there's a lot of things you can add, right, and then hit you a few times. So if I wanted to change the case of the next 10 letters, I could hit tilde 10 times 12345678910. Okay. But I wouldn't do that, because in Vim, you can always say, before you do a verb, before you do like one of these, you know, letter commands, single letter commands, you can type a number, which is how many times do you want to do it? So if I type 10, so if I type 10 tilde, it runs at 10 times. And so this is where things start getting interesting, right, because every single verb you can run in in in Vim, you can also say how many times to do it. So, for example, to delete a line, let me just create a oops, I've accidentally created far too many lines. So to delete a line, you press dd. To delete five lines, you just press five dd. Okay, so it's important to remember like everything you can do, you can put a number after it. But actually, it's even more powerful, because after most commands, you can also say, you can add something called a motion. A motion, for example, is right arrow, moves right one, left arrow moves down one. Shift G goes to the bottom of a file. Motions are things that move your cursor around. Now, that doesn't sound very exciting. Unless I tell you, after a command, you can type a motion, and the command will apply to the region that that motion covers. So for example, I'm currently on line three. And if I press Shift G, Shift G is the motion to go to the end of the file. D is the command to delete. So I can combine these together. D Shift G will delete to the end of a file. D Shift G. So that's pretty interesting. So GG takes you to the start of a file. So to delete from here to the start of a file, DGG. Or there's some really interesting motions. For example, let's create two bits. There's a concept of a paragraph. So right curly bracket takes you to the end of a paragraph. It takes you to the end to the next empty line. Right? Press it again. So that means if I want to delete everything from here to the end of the paragraph, I would cast D, right curly bracket. Okay. Or if I want to do that twice, so delete from here to the end of the paragraph and also delete the next paragraph. Actually, so let me show. I want to copy this whole second bit and make a copy of it. So in Vim copying something, it's not control or command C. It's called ganking. So you press Y. So I want to copy the next paragraph. So to copy this paragraph, I would press Y, right curly bracket. Okay. And then to paste its P. And by default, it pastes it to the line underneath. To paste it to the line above, you won't be surprised to hear it's shift P. So there's a copy. Now I want to go down to the next paragraph and change that to third bit. So I'll press right curly bracket. And I now want to delete this word and replace it with a different one. Deleting and replacing in Vim is called changing. And that's C. And so like everything else, that can be combined with a motion. So the motion to move to the next word is W. W goes to the next word. Right. B goes back a word. So to delete this word and let me start typing in a new one, it would be change word CW third bit. Okay. So if I want to delete from here to the end of the paragraph and the paragraph underneath, I can just delete two paragraphs. So that would be 2D. Right, curly bracket. Okay. So I would describe this as being highly compositional. Right. You can kind of combine numbers, motions and commands together. And then we haven't even touched on EX. Right. So let's talk about EX. So I'm going to delete to the end of the file D shift G and delete this line DD and colon WQ to exit. So I mentioned that we want to change this into something suitable to put in a YouTube video. So I'll press E Apple A, Apple C, cancel. And then I'll go Vim, I don't know, temporary insert Apple V GG. Okay. So here I've just pasted in this text. Right. And I want to clean this up. So I want to clean up the title. So I just press DD. And I want to do the same thing to the next line. So to do the same thing you just did again, press dot. So that's going to delete the line again. Now where this gets interesting is that will redo the entire like number command motion that you just did. So for example, if I press for DW to delete four words for DW to delete four words, and then press dot, that deletes another four words. And so that can get pretty interesting. So for example, Oh, okay, I'll show you a really cool example. To search in Vim use slash, which is pretty common in a lot of different tools. And so if I want to search, I don't know if you how many of you are familiar with regular expressions, but you can put any regular expression here. If I wanted to search for the next timestamp that Daniel created, I'd want to find a digit at the start of the line. Right. So to go to the next place where there's a digit at the start of the line, regular expressions use carrot for start of line and backslash D for digit. So this is going to search the ego and selects the next digit at the start of the line to search again, press N, N. Right. So this is kind of cool, right? Because what we could do now is if I want to delete everything up to all the next digit at the start of a line, well, slash is a motion. So I could type D slash carrot backslash D and that searches for the next digit at the start of the line and deletes to it. And so now I want to do it again. I press down, I just press dot. So now I'm removing everything that's not a chapter header. So that's pretty interesting. And then I can just delete to the end of the line with D shift G and delete the first line. And I'm just about done. Right. Of course, there's more than one way to do it. So let's look at a few different ways. Another way we could do it is we could delete all the lines that start with a hyphen. So there's a really useful ex command, which is the command G. G is, I think it stands for grep. It searches for things. And it does an action to anything, any line that it finds. So with any ex command, you first of all have to say, what lines do you want to apply it to? And nearly always, you want to apply it to all lines, which is percent. So generally speaking, for most ex commands, just start with percent. And then you say, what command do you want to run? So I want to run G, which is I'm searching for something. And then in ex, the different parts, the kind of the different parameters are generally separated by slash. So the next thing is, what do you want to search for? I want to search for at the start of a line, a hyphen. Okay. And then another slash. Okay. What do you want to do? And now I can put in any Vim command. And so remember the command to delete and Vim is D. So this is going to search for anything with a hyphen at the start of the line and delete it. There we go. Okay. So we could now do a similar thing to delete all the empty lines. So to delete all the empty lines, I would do percent G slash. Okay. I want to do any time you've got the start of a line followed by zero or more spaces followed by the end of a line. That's an empty line. What do I want to do? Delete it. Okay. So and then finally, I want to put a dash between that first space and the thing after it. So that's a search and replace. So again, we do column percent to apply some ex command to the whole file s for search and replace then the slash to put in our different parameters. So first, what are we searching for? A space. And then what are we replacing it with? Space hyphen space. And then enter. And so this will just apply it by default the first time it finds it. Okay. So that's like an overview of like why Vim is cool. Like when people say Vim is cool, they're not saying like, oh, you should use it because it's retro and interesting. They're saying you should use it because it's powerful. And specifically data scientists should learn Vim because this interactive text munging is what we do with input data files and output data files all the time. And something we can look at later if we want to is it's super easy to create macros in Vim, which is where like literally it'll just record each button you press. And then you can just rerun that macro. So if you want to run the same process on six different files, you just run the macro six times. Now this case, I want to close without saving. So normally if I go colon Q and it says, no, you haven't saved. So it's kind of careful to help you there. It says add exclamation mark to override. So I'll do that Q exclamation mark. Okay. Okay. So we can use that in Jupyter. And so now we're going to fix the problem which we talked about earlier, which is how come our files disappeared. And to fix it, we need to edit prerun.sh. So if I type Vim prerun.sh. So here we've got this. And the reason that the files disappeared is that at the start of our script, we typed CD. And that changed to our home directory. And we never went back to where we were. And so that meant when it ran Jupyter, it ran it from our home directory. This is actually currently showing the contents of our home directory. Now, okay, I want to show you now how we know this by looking at run.sh. I want to switch to editing run.sh without saving where I'm up to. And I want to show you a really neat thing in Linux that lets you do this, and Mac, which is Control Z. Control Z does something really interesting. It stops the process I was running and it puts it in the background. So if I type jobs, I can see what's running in the background. Vim is running in the background. I can do anything I like. And then any time I want, I can type FG for foreground, and it comes back to where I was. So I can hit Control Z, and then I can type Vim slash run.sh, which is actually what I was going to show you. This is the thing that they run for us when we start an instance. And you can see here it runs our script, and then it runs Jupyter. So our script was cd into our home directory, and then running Jupyter. And so Jupyter was in our home directory when it ran. So I recall and queued, exit that, and I'll go FG. There we go. Now, optional power user thing, which I use a lot, is I would not, that's not how personally I would have looked at the run.sh file. To look at the run.sh file, what I would do in Vim was I type colon sp, which stands for split, slash run.sh. And as you can see, Vim actually allows me to have multiple windows open at once. Kind of like Tmux, actually. Tmux in Vim has very similar functionality. And so then I can scroll around here, and then in Vim, instead of pressing CTRL B and an arrow to go to a different window, which is Tmux, in Vim it's CTRL W. Except that CTRL W closes a tab in Chrome, so that's possibly not going to work. Okay. So there's a couple of ways we could solve this. The probably the best way in a script is to use that trick I showed you last time, push D. Tilda is our home directory. So that's the same as CD, changes to our home directory, but it remembers where we were. And then pop D puts us back to where we were before. So that should fix our problem. Okay. So this untitled.ipy and b, we'll probably find that, yeah, see here it's in our, here it is in our home directory, which was not what we intended. So let's delete it. And we'll shut this down. And then we'll create another instance just to check that worked. Okay. So while we're waiting for that to get started, does anybody have any questions or comments about Vim? Hi, Jeremy. That is very good. That took me back to a previous life where I used to install WordPerfect on Unix boxes and then just working in a legal firm and said, what do you use for a word processor today before I put on WordPerfect? And this person, you know, legal secretary said, I use VI, which was like, Vim is VI improved or VI improved. But it was just amazing the power of it. If you know everything it can do, it's a perfect word processor. Yeah, it's great. I mean, I don't use it as a word processor to be clear. I use, you know, Microsoft Word or Google Docs is a word processor because I think they're very good word processors. But for a text editor, I use it a lot. If I've got, you know, a CSV file, I, you know, I want to do some quick cleanup too, or something like that. Or a log file. I'll use it. Yeah, pretty much anytime I'm editing a quick script or something on a terminal. That's great. You know, I will say Visual Studio Code is also excellent. And I wouldn't say like Vim is better or worse than Visual Studio Code. I use both of them. I use Vim more often than Visual Studio Code, but I do use both of them. And in fact, there is a button here. I thought somewhere. I thought there was like an open Visual Studio Code button, but maybe I'm imagining things, or maybe it has to wait until it's finished opening the server. Oh, here it is. Yeah. So there's a access remote kernel actually lets you connect Visual Studio on your machine to to the remote machine. So you can even use Visual Studio remotely. You can also use it in WSL on Windows. Don't install Visual Studio Code into the Linux box. Install it into the Windows box because it's got a WSL connector built in. So it treats WSL, you know, just as if it's a local Windows directory. You can also connect to any SSH instance using the VS Code remote connector, or yeah, just remote kernel thing. Yeah, I had a question. So, you know, you showed a lot of keyboard shortcuts for Vim, right? So how can anyone approach learning it because it feels a bit intimidating when you are a beginner? Yeah. Yeah. So I mean, the trick with learning something new is to try and like do it in small chunks, right? So don't expect to learn all of Vim. So at this point, I would say learn I to start inserting things, arrow keys to move around, escape to go back to command mode, colon WQ to close and save. And at that point, you can now use Vim to edit your shell scripts and stuff. And then like try and learn maybe one or two new commands each day. So, you know, one useful one motion or emotion each day. So, you know, W and B are useful to know to move forward and backward a word. And yeah, there's a lot of Vim tutorials and things out there. So for example, here's open Vim.com, which is going to introduce you by saying, oh, hit the enter key. Like, okay, I'll hit the enter key. And so you could work through a tutorial like this. Yeah, it's, we all get intimidated, honestly, Kirian, when we see an expert working with something that we don't know yet. And at first it's like, wow, that's powerful. I wish I could do that. But my God, you know, how would I ever get to that point? And the goal is not to be an expert at Vim. The goal is to like be able to do Vim to like slowly do something that you want to be able to do. And this is one of the things I, you know, really had to practice for myself in my late teens and early twenties was to repeatedly put myself in a position where I was intentionally doing things slowly by using a tool that I wanted to know. And I was pretty sure at some point would be useful, but I didn't know it well enough to do it faster than with other than some other tool. So I've always, you know, since, since like 16 been pretty good at using Lotus 123 and Excel spreadsheets, and I tended to turn to them for everything. And then I, I wanted to learn SQL databases. So I kind of forced myself to do things involving lists with databases for a while, even though I got slower. And then I was like, okay, well, I'm going to stop using, you know, I'm going to start doing more stuff with VBA macros and stop doing stuff manually. And again, it was kind of slower for a while. And particularly like, you know, things like cleaning up that YouTube timestamp thing, I could have done that manually, you know, and the first 10 times, it would be faster to do it manually. But don't do it manually, right? Because each time you do it manually, you know, you're missing out on the opportunity to get better at the thing that's going to make you faster. And the thing about practicing what you think might eventually be the fast way is that those fast ways accumulate together in kind of these multiplicative ways. And so, you know, I've been kind of using this approach of always trying to do things the way I suspect would be the fastest if I was an expert at it. I've been doing that for like 30 years. And now most people who watch me work go, wow, you're very fast at doing stuff, you must be really smart. You know, I'm like, no, I'm not really smart. Like you should have seen me when I started, I was terrible. But now these things have all accumulated, right? So, yeah. And if anybody finds, you know, good tutorials, let me know. Honestly, it's been a long time since I've run a Vim tutorial. So I don't know if this one's good or bad. It's just the first one that came up in Google. But I think my tutorial is good. The best tutorial is on Linux in the terminal. If you just type in a Vim tutorial in the terminal, it should pop up a very nice tutorial. And I just wanted to say, Jeremy, that, you know, few minutes of speech that you just gave that was absolutely wonderful and very useful. Okay, yeah. So here is what happens if you type Vim tutor and it will teach you exiting Vim. So lesson one, moving the cursor, lesson two, exiting Vim. So that's, that's a good start. Make sure caps locks not depressed and press J enough times so that lesson point 1.1 fills the screen. J, J, J, J, J. Okay, so because the Vim tutor is in Vim, it forces you to use Vim, which is good. And the nice thing about this is, you know, move the cursor to the line below marked blah, blah, blah. Here it is. Fix the errors, move the cursor. Okay, so here's a useful one to know. X to cross out something. So X. There we go. Thanks for that reminder. And the first time you do, you go through the tutor, it will feel overwhelming. It did to me only after, you know, on like third, fourth try, does it start to make sense and are able to complete the entire thing. But also, when I was learning the basics of Vim, I realized that it has a steep learning curve. And I like to make things appealing, attractive, and simple for me. So I think Dimitri also mentioned this in the chat here a second ago. There is a game called Vim Adventures, which is in your browser. And it's another way that you can get exposed to Vim. That's how I learned it. So I would dine into a call when I had my corporate job. And instead of, you know, whatever people do on calls, which is just, I don't know, browser edit, I would do this. And that was a good use of my time. Okay, now I just tried pressing the arrow keys and Vim to see what the Vim Adventures and it says, don't use the arrow keys, use HJKNL. I don't agree with that, by the way. I, you know, some, like a lot of people are overly purists about like, you have to do things the Vim way. So, okay, yes, you can use HJKNL, but seriously, it doesn't matter. Anyway, by the way, I see there's actually just noticed there's a few things in the Zoom chat. If you can, please say it out loud. There's a couple of reasons why the first is I really enjoy social interaction. Otherwise, I'm kind of sitting in my little office, you know. And then the second is, of course, for the video, people can hear the questions. Now, I know sometimes people just can't really talk because they're in some environment, they can't do it. In that case, if you see somebody asking something in the chat, could you say, oh, Mike M asked, what key are you pressing to undo Jeremy, rather than just answering it in the chat? And that way I could like say that. Anyway, it looks like, so yeah, somebody said, how are you on, how did you do undo? So the answer is you to undo. Can I suggest one last resource that is quite amazing for them? It's the Vim book, editing at the speed of light. Editing, I don't know that one. Speed. Speed of thought? Oh, yes, yes, yes. Practical Vim. It's absolutely, you know, really well written. And there's a similar book for T-Max. So that's, that's how I made the really big difference. Now, let me tell you something not to do, which is don't install lots of plugins. There's lots of plugins you can install. And, you know, after using Vim for well over 20 years, I don't use any plugins at all. It's not to say that there are none that are any use. But like, they're not that useful, honestly. And you can get lost in that whole like, customizing things thing. And I just want to make it clear to say like actually out of the box Vim works extremely well. Now, having said that, I customize it using a VMRC. So an RC file in Linux and stuff is like, you know, the normal kind of suffix for configuration files. And I do do some customization of it. And I actually put all my configuration files in a GitHub repository, got dot files. And you'll see here, there's a VMRC. And, but it's only 99 lines. And there's things like, for example, remember, I mentioned that you can jump to the next, you can jump around Windows by pressing Ctrl W, CW here means Ctrl W. I made it so you can also press backslash W and backslash up and backslash down, sort of Ctrl W, because it's like one key rather than two. So it's just really minor things like that. And also some little things like, oh, I guess I do have some things installed, I don't use them anymore. Also some things like Python syntax highlighting. And also to be able to see things clearly when you've got a black background with light text, you have to say set background equals dark. So I don't know, little things like that. And it comes with some nice defaults, you can just actually do this source command to get some nice defaults. Quick question, please. Is this one public or private? Everything of mine is public. Fantastic, thank you. Pretty much, I think. Yeah, I have a question. What are your thoughts about Visual Studio Code to edit those, edit files? Yeah, great. I just talked about it. Yeah, I said it's really good. Yeah, I like Visual Studio Code. Do you suggest using WIM key bindings for Jupyter and VS Code as well? I don't, because I find it's not about the key bindings, it's about the numbers and the motions and the dots and the macros and like that stuff. And I don't find that there are other editors that WIM as well as WIM do. So when I use VS Code, I rather, you know, like fully inhabit the VS Code world. And so I use the normal VS Code key bindings and try to learn to use VS Code as well as I can. So yeah, I don't do that. But sometimes I've tried and I'm always disappointed, you know? It's always like, yeah, it's not really WIM. So VS Code is great at being VS Code. And I would use that for, I don't know, like editing a big markdown file maybe. Oh gosh, I don't use it much. But like, I guess if I was like working with HTML or CSS or something, I feel like the way it kind of handles those kinds of file formats is really nice. You can set up WIM to be really nice as well. But VS Code works a bit better, more out of the box, I suppose. Yeah, and also for like navigating through a large repository, VS Code can be a bit easier to use maybe. How to ask whether you could use a fairly large project with multiple files and whether it was doable via WIM? Yeah, it's definitely doable via WIM. Yeah, I mean, we can take a look if you're interested. So yeah, let's take a look. Actually, it is useful to know how to do this. So let's take, for example, the FastAI repo. Okay, so let's clone it. And so let's do it all in paperspace. Now, in paperspace, the slash notebooks directory is persistent across machines, right? So it probably makes sense to clone this into the slash notebooks directory. So if I open up my terminal, so it's persistent within a machine and it's persistent across restart. So if I get cloned here, it'll still be on this machine next time I open it because that's what slash notebooks is. It's persistent across restarts on one machine. Quick question, Jeremy. Yeah, actually, just before you do, I'm just going to cancel this and mention some a little shortcut, if that's okay. Did you see that was taking a really long time to clone? The reason why is it's cloning every single version of FastAI that's ever existed. And since I don't need every single version, if you type minus, minus depth one, it'll just give you the most recent version that'll save some time. So yeah, so go ahead. One of the other scripts you had, you were bringing in slash notebooks from storage, not like storage somewhere. Is that? Yeah, I didn't really understand how notebooks slash notebooks persistence worked at that point. I hadn't spent enough time reading the docs. Yeah. So let's pretend that never happened. Okay. So now that I've cloned this into slash notebooks, you can see it's appeared, right? Because this is where Jupiter is running from. Now, so FastAI is what's called an NB Dev project, which means it's all developed in notebooks. So these are the notebooks which create FastAI. And then those all get exported as Python modules into here. That's not a very interesting one. And as you can see, it says, oh, don't edit me, edit the notebook. That's fine. Okay. Now, if you want to explore through a code base, it's really helpful to be able to click on symbols, whatever, and jump to their definitions and then jump back again to kind of see how it all works. And so you can actually do that on GitHub, by the way. I don't know if you've noticed this, but it's quite neat. So for example, to detach, if I click on it. Oh, it's interesting. It doesn't know how to find that one. It's not perfect. That one's actually from PyTorch. That must be something it knows how to find. All right, this one. Tabular model, maybe? Let's find it. Yes. Tabular model. Okay. Well, this is very strange. In theory, it would have finally found one. Okay. So one problem with doing it in GitHub is it's not particularly good at it. But yeah, so Vim can also do that as can VS Code. And VS Code and Vim both rely on something called CTags to do that. CTags is a project to create an index of the symbols that are in your program. So we want to install that. I actually haven't bothered Googling it for like 20 years. So I didn't realize that the thing I am used to using has been updated to this new thing. So that's interesting. I guess I should try using it. So Ubuntu, install, universal CTags. Oh, God, snap. I don't like snap. I guess I can if I have to. Actually, I tell you what I normally do for installing things is I like to find out if there's a condor installer because that makes life very easy. And there is. There's a universal CTags. Okay. That's handy. Universal CTags. So Mamba, install, universal CTags. And this is one of the really cool things about condor and Mamba is that I can install. Well, we don't have Mamba installed. That's fine. We can set that up. Condor, install, minus C defaults, minus C, condor, forge, Mamba. And so in some future lesson, we'll talk about how to get these condor and Mamba installed things working in persistently in paper space. There's probably some way to do it in snap as well. I've never bothered checking. I don't know if anybody knows. Ubuntu, snap, install, home directory. This thing that Jeremy is going to show us, this will give us superpowers. You know, this is one of my favorite features of them and of just jumping into them whenever I'm browsing through any code on the next in the team, Max Payne, and this is the way that professional developers interact with code. It's not even all the professional developers. So like, you know, the ones who, like a limited few, like very few people can navigate around code that quickly. And I think that that really makes a enormous difference. So whenever Jeremy covers this, I become excited and, you know, that's great. We like you getting excited, right? Okay, so there's Mamba. So we can have a Mamba install. Oh, I just pressed up here a couple of times. Universal C tags. Oh, and we don't. Okay, so we're not using Mamba forge here. We should probably, I might ask Paperspace if they can switch to using Mamba forge so we don't have to worry about this in the future. But for now, we'll have to put this from the condor forge channel. Because the one that they've got installed does not use condor forge by default. I might also talk to them about making it so that Python 3.9 is the default since it's still using 3.7 as we saw last time. All right, so if we CD into the fast AI directory, there's a bunch of Python code we want to look through. So if you type C tags, that's the program that creates the index that we want. And to run it recursively on the current folder, most things in Linux and stuff for capital are for recursive and then dot means the current folder. So that's indexed the current folder and it's created, I expected it to create a file called C tags. I wonder if it's changed how this works. Oh, sorry, it's created a file called tags. So it's created this file here called tags. And if you look at it, you're basically it's just a whole list of like symbols that it found in my code and regexes to find where they are and what file it came from. You don't ever have to look at that. The key thing to know is now we can jump straight to a tag. So for example, if we want to open up the array mask, whatever file defines array mask and put it in the right place, I can type vim minus t for vim jump to a tag and type array mask. And that will jump straight to the definition. Okay. So that's one way to do it. Another way to do it would be let's say we were looking at something else like layers.py is you can type tag jump and then type ar tab and then it'll list all the things that match and then I can hit enter. And that will jump to that tag. Another thing that you can do is you can notice for example, this is inheriting from array image base to jump to the definition of array image base. It's control right square, right square, right square bracket. And so when I hit that, it jumps to that definition and then go to go back to the previous tag. It's control t for tag. Okay. So they're the key ways to jump around. Okay. So for example, if we wanted to find out some tabular class, I could go tab, tag jump, and I start typing tabular and hit tab. And here's my various tabular classes. Go to tabular colab. Okay. So tabular colab is defined in two places. Now that's annoying. One is it's in an iPod checkpoints, which is the backups. So this is where you would actually create a C tags config file telling it to ignore anything inside iPod NB checkpoints because you never want to go to the backup version. Anyway, so for now it's confused about which one I want. So I hit two to go to the non confusing one. And there you go. Any other tricks you know with tags, Radik? Yeah, just wanted to mention one and this is what I did only once or twice because I'm always lazy to set it up. But there is some way like with the fast AI code here. So you know that it's using PyTorch a lot. And sometimes you would be editing a fast AI file, but you would like to jump to the definition of some function functionality in the PyTorch is a code base. Oh, yes, that's a good one. That's very helpful, especially for, you know, if you're just starting with PyTorch, starting out, it's so much nicer than using their documentation on their website, which is slow. And, you know, you have to still search for it, but yeah. Yeah. So, you know, maybe in the future, we can try setting that up as well. So yeah, you can set it up so that these tag jumps can jump into the Python PyTorch source code as well as the fast AI source code. I'll just show you one more trick, which is if I wanted to look up to find out how data loaders worked, but I want to be able to see co-lab data loaders at the same time, then hitting right square bracket isn't quite ideal because I've now lost what I was looking at. So instead, if you type S tag, that means split tag, and I can start typing data loaders, then that will split the window and jump to the tag, so I can now see the two things that I'm doing, which I find handy. Anyway, there's a lot more stuff you can do with this, but hopefully you've got a sense of like, yeah, this seems worth investing time in because here are some things that I didn't know how to do before and might be helpful. Just on the split again, Jeremy, my tab closed down when I pressed command W to move around. How would you do that within the Chrome browser again? Between Windows. On a Mac, it's fine because control and command are different, so you can just control W does work. On the Mac. On Windows, if you use my dot files, maybe we can, in some future one, we'll learn about my dot files, but in my dot files, I set up, and so if you make this your VMRC, then basically you can hit backslash up and backslash down to go up and down a split, because I think this CW, this means control W will be sent to VIM rather than the browser, so I think that should work fine. Great. All right. Nice to see you all again. Have fun with VIM. Tell us if you find any cool tricks on the forum, and I'll see you next time. Cool. Thanks, Jeremy. Bye. Thank you. Thanks, Jeremy. Bye, everybody. Thanks a lot. Bye, thank you.