Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Preview
Start a free Courses trial
to watch this video
Learn how to learn more about your IDE.
Additional Directions
- Keyboard shortcuts you cannot miss
- Step through the Help > Productivity Guide
- Get familiar with the Navigation Basics
- Check out all the links about Code Analysis
- Learn how to work with the different Tool Windows
- Debugger basics will give you some more tips and tricks. I plan on doing a deeper dive in a workshop.
Even more
- Entertaining video about IDEA from Technical Evangelist Hadi Hariri at JavaOne 2014.
- Keyboard shortcuts PDFs for PC/Linux and Mac
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
There's an old proverb that goes give
a person a keyboard shortcut and
0:00
they'll be more productive.
0:04
Teach a person how to learn shortcuts
on their own and change the world.
0:05
It was something like that,
maybe a little more profound.
0:10
Now I mentioned earlier that the
documentation in IntelliJ is pretty great.
0:13
Let's take a quick tour through it.
0:17
One thing that I wanted to point
out is that IntelliJ IDEA goes to
0:19
a lot of effort to make sure you
don't need to use your mouse.
0:22
It uses a mnemonic approach.
0:25
So any time you see something underlined,
0:27
it means that you can push
that key to make it focus.
0:29
It also means that editing
text has many handy shortcuts,
0:33
and you should know about them.
0:36
So let's go ahead and take a look.
0:37
So if you come in here and
we go under Help, we choose Help Topics.
0:38
It's gonna open up a pretty
awesome web page that they have,
0:41
I'm gonna bring that over here.
0:44
At full screen here.
0:50
Now I happen to know where the editing
is because I've been in this quite a bit
0:51
preparing for this course.
0:55
And I wanna show you if we
go under IntelliJ Editor
0:57
> Quick Start > IntelliJ Editor.
1:04
And then I wanna show you basic
editing procedures, okay.
1:09
So they've done a really good job.
1:15
Up here there's this key
map you can choose and
1:18
you can change it to
whatever you want to do.
1:20
So let's go ahead and
keep it where it's at.
1:24
So here it says to select the entire
text in the current editor tab
1:27
do one of the following.
1:31
Edit select all or Cmd+A, so that's
kind of common in all applications but
1:32
if you're here and you press Cmd+A,
bam, everything's all selected.
1:35
Selecting text with the navigation keys.
1:40
To select text from the current care
position, press Shift+Alt+Left and
1:43
Shift+Alt+Right.
1:46
Also you can select one character
at a time by pressing Shift but
1:48
if you also put Alt on there you
can jump a word at a time, right?
1:50
That's pretty cool, might have seen that.
1:52
That kinda works on all word
processing places up and
1:54
down resting your hold down shift and
it's kind of highlighting.
1:57
And you can cut copy that way.
2:00
You can do Page Up and Page Down a Mac.
2:04
That's with the Function key,
if you don't have that on your keyboard.
2:07
So if I do Shift+Function+Up.
2:11
Home and End on a Mac are with
the Shift+Function+Right, right?
2:15
So if I was in the middle of this, and if
I don't press down Shift I just hold Alt I
2:20
can jump my cursor around that way too.
2:24
So, I'm gonna go to the front of the line,
so
2:26
I'm gonna do Shift+Function+Left, and
I'm gonna go to the end and do Right.
2:28
So that's Home and End.
2:33
You might see there in
their dock it says that.
2:35
This is a super cool feature here,
this extending selection.
2:38
To select that, we're not going
to hold down the Shift key,
2:42
we're just going to hold down the Alt key,
I'm gonna press Up and
2:43
it knows that it extended
to the word that I was on.
2:46
But I can go more and
I can get the whole index as well.
2:49
And then it's gonna go up again, and
then it's gonna get all the arguments and
2:52
then it's gonna get the entire line.
2:56
Then it's going to get the entire
line including that and
2:58
then up again, and up again.
3:01
And then now we've got
the whole while block.
3:03
Now we got all the while.
3:05
So it knows about the code, right?
3:06
And then if I'm going to jump
it will get the whole class.
3:08
Pretty cool right?
3:11
And down works the same way so
you go down with that.
3:15
So, there's some multi-selection,
there's some more steps are here.
3:18
So, don't get overwhelmed.
3:22
I want to pop over really
quick to commenting, because
3:23
this is something that I find very helpful
when I'm trying to walk through and
3:26
really learn the language.
3:31
You might want to learn how to comment and
un-comment lines.
3:32
So, basically all you need
to do is get you cursor.
3:35
Here, like let's say we don't want this
reader anymore and I'm gonna comment it,
3:39
so I'm gonna press CMD+Slash.
3:43
See, It drops a comment at the front and
I can undo it as well.
3:45
I can do that with multiple lines, so
3:50
I can get rid of this whole thing
inside the try block here.
3:51
But, if you wanted to do
it properly with Java,
3:54
you can actually hold
Cmd+Alt+Forward Slash, we'll push that.
3:58
So see it's got the proper
star slash star there.
4:02
And you can undo with Cmd+Z.
4:04
All right, and here, this is a great one.
4:13
Adding, deleting and moving lines.
4:13
This is something that we do all the time,
right?
4:17
We wanna move lines around,
we wanna change them so,
4:18
one of my favorite things to do, let's say
that we wanted to duplicate this here.
4:22
We wanted to write something else so
4:26
if we do Cmd+D,
it will automatically duplicate the line.
4:27
So, I could've obviously
selected the line, copied,
4:30
pasted but
just duplicating it is pretty handy.
4:33
And delete an entire
line with Cmd+Backspace.
4:37
We can also move lines around.
4:40
This is pretty handy so I if do
Cmd+Shift+Up, see I can move this line and
4:44
see how it's jumping in the right place.
4:48
It's jumping in a different
part of the code there.
4:50
Pretty handy.
4:54
So I also wanted to show you that,
let's accidentally delete this line and
4:57
I can of course, undo it and
I can redo what I did.
5:01
So Shift+Cmd+Z or Shift+Ctrl+Z, right?
5:04
One thing also that I wanted to show,
let's say that I heard about another
5:09
editor and I got kinda jealous cuz I know
Sublime Text has this multiple cursors
5:12
thing and I was wondering if
this editor supported it.
5:16
So I could go over to the search,
I could come up here and
5:18
I could just start typing.
5:21
Well oh, look, multi-cursor,
it does have it.
5:23
Cool.
You should check this out,
5:26
this is really cool.
5:27
We'll go over this here in a little bit.
5:28
And if you scroll down,
5:30
you can see that they're all
kind of locked together, right?
5:31
So here's the selecting text that we had,
that we were looking at before.
5:34
So you kinda get in this one of
those documentation holes here but
5:36
it's a lot of fun learning what
you can do with this editor.
5:39
Here's the Help.
5:42
Are you feeling more productive already?
5:43
Well, check this out.
5:45
Over here in Help,
there's a thing called Productivity Guide.
5:46
This is great, it shows they're
grouped by different things and
5:53
they show how many times
that you've used them.
5:56
And I find this as well,
that I should use this.
5:59
And if you open it up, it'll show you
great hints about what's going on, okay?
6:01
So I think that
6:06
you should come back here whenever you
feel the itch to explore things more.
6:09
Don't get overwhelmed, but just keep on
coming back and learning more every time,
6:13
cause the more you learn this,
the more productive you'll be.
6:16
Oh, and finally, I wanna show you
the motherload of keyboard shortcuts.
6:20
So you go Help > Default Keymap Reference.
6:23
It's gonna open up a PDF.
6:28
Wow, right?
6:33
That'd make a great tattoo.
6:35
It makes sense that
the help is also large.
6:38
IDEs do a lot of things.
6:40
I've added a bunch of directions
on the teacher's notes.
6:42
Remember to use that productivity
guide every once and
6:45
a while to pick up new tricks.
6:47
After you get the hang of it,
6:49
show off your tricks to your friends,
it's more impressive than juggling.
6:50
If you find something that you love,
come and share it on the forum.
6:54
I plan to make several workshops
on the greatest IDE hits
6:57
showing off the favorite tricks and
tips from different editors.
7:00
Also Android Studio uses IntelliJ, so
7:04
all the stuff you earn here,
will work there too.
7:06
We have a amazing set of Android
questions here on Treehouse and
7:09
with your new super powers,
you're already productive.
7:12
Now that you're getting
comfortable with the editor and
7:16
navigating around,
let's practice it some more and
7:17
introduce some more advanced tooling,
right after you wrap up this exercise.
7:20
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up