Effective PyCharm (2021 edition) Transcripts
Chapter: PyCharm Projects
Lecture: Search everywhere

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Let's look at another super powerful feature called 'Search Anywhere'.
0:04 And if you open up PyCharm and there's just this empty placeholder where the documents go.
0:09 go. The very first thing that you see is search everywhere.
0:13 Double up arrow the double shift.
0:15 What does that mean? Well there's this search icon over here and you could click
0:19 this. It says it searches for classes,
0:21 files to windows, et cetera.
0:23 Even more than that. But I never use this.
0:26 I just press shift really quickly got to do it pretty quick.
0:30 So hit shift a couple times and check this out.
0:34 First thing you get if you don't type anything if you don't have anything selected is
0:38 you get your recent files. So for example,
0:41 we had this UI helper open here.
0:43 This is the rock paper scissors game that up at the top is using the UI
0:48 helper that we just saw. So incredibly helpful.
0:51 And I use this all the time.
0:53 If you have a small project that just has one or two files,
0:55 well, just go to that file.
0:57 But real projects are large, much much larger.
1:01 For example, over at talk python training,
1:04 We've got about 20,000 lines of Python code that make up the website.
1:08 You don't want to just click around till you find it.
1:11 You want to be able to quickly jump there.
1:13 And one of the ways you can do that is to jump to the recent files
1:16 but maybe maybe we want to go and find something else over here.
1:21 This rock paper scissors things. One of the things that it does is that here
1:24 you can see right here is it shows the leaderboard.
1:26 So I suppose I don't have this open.
1:28 But I I know there's something about a leader or showing the leader board and I
1:32 want to get too. It's all pull up search anywhere and I'll just start to
1:35 type, I'll just type of leader.
1:37 Look there's all the functions that we could do.
1:39 We could load leaders, we could show the leader board and then obviously I could
1:42 jump back over to it. That's pretty cool.
1:45 But you gotta make sure unselected and pull it back up.
1:48 But there's better stuff I could do.
1:50 I could just type notice it was show_ leaderboard.
1:53 I could type sl and it just matches the casing the separating letters here.
1:59 It also works for camel casing,
2:00 like S, L,
2:03 The 'sl' here's the show leaderboard.
2:05 But notice there's a whole bunch of other things like settings about turning the line numbers
2:09 on and off and the local history and so on.
2:13 So we could restrict this. Just a classes.
2:15 And notice here, we're looking in all places,
2:17 we could just look in the project.
2:19 I don't think many classes here,
2:21 so not all that's gonna happen in the files and the symbols.
2:25 This is what we're working on.
2:27 And then the actions these are like commands.
2:29 These are the menu commands and whatnot.
2:31 Instead of if you don't remember what the hotkey is like.
2:34 Alt/option+ shift command d to show local changes as UML which whoever remembers that
2:41 you could just type UML.
2:44 No. Yeah, there it is.
2:45 And then it reminds you why you're there,
2:47 what the hotkey would be, but you don't have to use it,
2:49 right. This is super, super useful.
2:52 So two really important things to take away nothing selected.
2:56 And having done it before. Really important for jumping around recent files,
2:59 even if they're not open. And then the other one is,
3:02 let's go to that leaderboard. I want to jump down to the show leaderboard and
3:09 there it is now, it doesn't just take you over here.
3:12 There's one more thing to keep in mind.
3:13 So suppose I'm I've got this collapsed and I've got this selected and then I go
3:21 over here, let me actually close it.
3:23 Let's go on and back over here.
3:25 Now, I want to go to the show leaderboard.
3:29 I go back to it. Look,
3:31 it has it exactly as it was like,
3:33 this is collapsed. This is selected.
3:36 Really, really nice that it takes it back,
3:38 takes you back to it exactly as you were working with it before.
3:41 It doesn't just open it from scratch.
3:43 So this search anywhere is really,
3:46 really valuable and I'm certain it's in general under used.
3:50 I have nothing else certainly for the recent files but goes way beyond Finally,
3:54 you can also include non projects items.
3:56 So if I want to look for requests,
3:58 if I've got requests installed as a package here,
4:01 you can see that would jump me over to the actual code for the request package
4:07 This is the thing that we installed.
4:10 Search anywhere, make sure you make good use of it,
4:13 double shift or the little icon in the top right.