>> Hello, everybody. I'm Cody,
Program Manager for Visual Studio for Mac here at Microsoft.
Today, I'm going to show you
how to get the most out of Visual Studio for
Mac by navigating and searching your projects.
To do this, I'm going to use a Xamarin.iOS app.
This app is a chat app which uses
the Microsoft Bot Framework and Xamarin iOS.
To get started, let's look at the product we have here.
The first thing I want to show you is how to
navigate through the project using your keyboard.
One of my favorite features is the ability to move lines
of code with option and arrows up and down.
If I want to reorganize this,
I can do it quickly without having to copy and paste.
Let's move this declaration to the top, as well as this.
Finally, this one, and why not this one up as well.
There we go, organized code without the use of a mass.
These are the things you can do too.
Let's search the project and see if
we can find what we're looking for.
I want to find the Bubble chat section
because I know that's a huge part of this project.
So, I'm going to search for the word "Bubble".
All right. So, let's search in solution.
Here are all the different usages of the word "Bubble".
BubbleFactory, that sounds like a fun place, let's go there.
Double-click on it, you navigated to exactly where you want to be.
So, here we declare a new bubbleFactory.
Okay. I see some comments here that maybe I should uncomment.
I can either copy and paste and move this around or
so I can click on it, toggle line comments.
You might have noticed that there were no shortcut there too,
that would be command slash.
You can also select multiple lines,
command slash that as well.
All right. Let's see what else we can do with our keyboard.
I'm going to search down here,
and go to the Outgoing Bubble Image Data.
Here we see, again,
where we declared our bubbleFactory and where we actually use it.
This isn't too far away,
but still demonstrates that technology.
Let's right-click on bubbleFactory and say, "Go to declaration".
Here, takes us up to where we declared it.
On the over side,
we can click on bubbleFactory and say "Find references".
Here, you search for all the different references
where we used our bubbleFactory,
click on it, to send your focus there.
Another thing that we can look at is this messages.Add.
Now, I don't know where this is.
So, let's again click on it and say, "Go to declaration".
Awesome, is the thing that I named group here. All right.
Messages, not super descriptive,
let's right-click on it and say, "Rename".
This will rename all instances of messages.
Let's name it, "My message". All right.
So now, right-click on it say,
"Find references", and you can see
all the different my messages populated.
I don't have to do anything, just all I had to do is right-click,
hit "Rename" and did it for me. It's pretty powerful.
Another powerful search feature is the ability to find
references to all overloads. Let's try that again here.
So, right-click on "My messages",
hit "Navigate", and find references to all overloads.
Here again, we see all the references here.
As you can see there are,
many different search options within navigate,
you'd also find derive symbols,
based symbols, and extension methods.
Do you find a lot using this simple tool?
All right. So, that does it for searching,
let's see what else we have.
Let's say I get really angry one day,
and totally mess up the format of this document.
Everybody would we terribly mad if they check this
out and tried to see what the heck I was thinking.
So, let's see if we can fix this.
How about to the "Edit" menu,
choose "Format", and set "Format Document".
It also has a keyboard shortcut,
so you don't have to go through the menu.
Let's click "Format Document".
Look at that, my anger is gone,
project is fixed, and everybody is happy.
I can now take this back in
and my coworkers will be my friends again.
One issue you have multiple people working on the same project,
is formats of variables.
Let's say that my team wants to use all lowercase but I don't.
I'm going to give in and just go
ahead and set this to all our case.
I can do that by saying "Edit", "Format", "Lowercase".
There we go, it goes down to lowercase.
Same with this guy, "Edit", "Format", "Lowercase".
I could also do the opposite and I can make these shout at you.
"Exit", "Edit", "Format", "Uppercase", but that's terrible.
Command-C, search it back.
In this video, I showed you how to get the most of
the Visual Studio for Mac by navigating,
searching, and editing your project.
There's a bunch of technologies that I didn't have time to show.
So, please download it and give it a try for yourself.
Thank you and stay tuned for the next video in our series.