Welcome everybody you're watching Mr Fugu Data Science. Today's a quick video for anyone who
needs keyboard shortcuts for Jupiter notebook in order to improve their workflow or if they're complete
newbies. Feel free to hit me up here on my socials as usual. Let's get started you have two different
things to consider when you're using a Jupiter notebook. Something called an edit mode and then
you have what's called a command mode. The command mode which we'll see right here. Will be lit up in
blue for your cell block. if indeed you started typing away it turns green which becomes your
edit mode. In order to enter and exit each of these modes you could do enter. That lets you enter edit
we could press Escape. That allows you to get out and do the command mode. And I just did control
return. So we can close out this markdown cell. I'm using a Macbook anything that says command switch
it with control if you're using a Windows device. The above was mentioned because it's important
for some functionality for your shortcuts. Some are independent of editor command mode. Some are
not. Here's something I'm just going to tell you right off the bat. If you're in the command mode
hit H and that's going to bring up all of your commands that you can start playing with. You can
start learning these. I'm letting you see that right now for those who don't want to watch the
whole video or they just want to pause the video and see what these look like on their own. I'm not
going over all of these just some of the important ones that I tend to use. I have five examples. Each
example will go over some little tidbits which I think are important or a good stepping stone.
We should scroll over so we could see what we're toggling between I'm going to hit Escape so we can
be in the command mode. First thing we want to do let's highlight everything within this cell block.
So now I'm in edit mode it turns green. I'm going to do command A. Highlight everything. If I want
to copy everything I could do command C and then hit this one and do command V. Command Z deletes
everything. Let's go back up and what does it say. Let's do the enter c. In order to do that
we need to be in the command mode and we'll just do C and then V and that will put it in the Cell
Block below. What just happened? Let's go back up here let's delete everything and let's
do this again. I'm in command mode which allows me to only do copy which is C and then V which
puts it in the cell below. If I was in edit mode I would need to do command C instead. If we wanted to
indent everything. We're going to do the command a to highlight everything and then we could do a
tab. And then we could do a shift tab to un-indent or we can do a command left or right bracket and
that's going to allow us to toggle back and forth as well so we could highlight a couple of these
do the same thing. We can do a reverse indent with the shift tab I said. Which is like this. We have
the start or the end of the cell. What do you mean by this? Do command right arrow, left arrow. Right
arrow., left arrow. That will let you do pardon of me. We're going from the left and the right of this
line. But if we do the same thing with up and down. We'll go from the top to the bottom of the cell.
If we do the option left-right. This goes word by word. If you want to toggle like I said: command
up down. We already did the command A above for the editing. Let's play with this. This is an
actual code block. Let's get into the command mode which is the blue one and type M. This converts it
into a markdown file. and I can do control return and it runs this specific code block. We could tap
it again and we could push Y. That turns it back into actual code. But if you notice is commented
out right now so we don't have errors. And then if we did R it turns it into a raw file.
We can do different ways of running individual cells. Let's just do something real quick to play
around with. So if you do shift return it runs the current cell and goes down to the next one for the prompt.
If we go back up and we do option enter it runs that cell and creates one directly below it. If
we do command enter it runs this current cell only. If we do got this twice command S that
saves the notebook. If we do command D that deletes the line. Let's say something goofy
so it deleted that line. But what happens if we do something else? We can go into command
mode and do DD and that deletes that cell. If we wanted to find something and replace it we
could do command F and we could just search for whatever word we are wanting and then we could
add something like this. Anytime we find oh this is refined anything with delete. If we wanted to
scroll up and down the notebook we could go into command mode and we can go and push the
spacebar to go down or shift spacebar to go up. If we wanted to add a cell above or below we'd
go into command mode and press A for above or B for below. If we're deleting them go into command
mode we deleted all three. I already went over the property of undoing a delete which is command Z.
If you have a situation where you need to interrupt a kernel such as if you're doing
a loop that goes nowhere and gets stuck or some really long code something less complex things
like recursion; this can happen. Just do I, I if you're in command mode or zero zero to restart
the kernel. if you want to select multiple cell blocks. We're going to do shift and then up down
to highlight multiple blocks to do whatever you want get rid of them, copy them or whatever. And then
if you would like to copy and then paste into another you have two options. We went over this
before but let's do it again. You can do command mode CV creates a new cell below or you can do
the highlight if it's really short by hand or command A command C. Go into the next one command
V. We got something really interesting here. We have something where you can scroll and toggle. Let's
do this real quick. Let's say we push option and then I'm scrolling down manually with my keypad.
And let's add something in here like two minus signs. It's doing it for everything or whatever
other operations you want to do. And then I could just do my control enter closes out this block,
perfect. If you need to increase the size of the font for you to read or working on your code just
do command Plus or Minus. If you want to go page up or page down by one cell do Escape J to go down or
K to go up. The next video I'm going to feature some basic magic functions and I might in a near
future video do something with some Google collab tips or tricks. But as always please like share
and subscribe and if you subscribe turn on that notification bell. Feel free to hit me up on my
socials. Thank you to everyone who's helped support the channel and left positive encouragement over
the last few years. I do apologize for not making videos the last year. I've had things going on
which have prohibited me having the time and I am really sorry. But thank you. See in the next one bye.
You never know where life is going to take you. If any of you recognize this photo feel
free to throw it up in the comments. Recently I celebrated a special moment in my life and
some of these are very important pictures or videos of those. If you recognize any of them
for instance a aromatic tea, a donut called a churro, my special anniversary desserts, some
wonderful wonderful barbecue and some dishes that are only made in this very
special country which is a new beginning for me. I threw two backpacks together and
one on my adventure to start a new life. Thank you for all your support everyone
over the last few years. The last year has been crazy. Really crazy. But thank you
[Music] ha
[Applause] [Music]