>> Hello everybody, and thank you so
much for joining me here again today.
My name is Cody Beyer,
Program Manager on
the Visual Studio for Mac team here at Microsoft.
Today, we're going to go over some of the improvements to
the code editor in Visual Studio 2019 for Mac,
that allow you to take advantage of
some new advanced features that help you write better code faster.
Let's get started. As you can see here,
I have a to-do to add some IDs to this mock data set.
Now, I could type them seven
times or I could do find and replace but
there may be instances of name somewhere
else within the code file.
So I'm going to use
a new powerful feature of
Visual Studio for Mac called Multi-caret editing.
What multi-caret editing does,
is allow you to edit multiple lines at the same time.
Either using common keywords or by placing cursors manually.
I'm going to place the cursor manually in each
of these new items to add an ID field.
To do this, I'm going to hold
option shift and click
on each area where I'd like you knew carrot.
As I'm doing this, you can see that with each click,
a new character appears as a blinking cursor.
Now that I have all the codes I need,
I'm going to go ahead and add the code.
Perfect. I now have the code I
need as able to edit all those lines at the same time.
Let's check out some other new features of
the editor in Visual Studio for Mac.
One new feature, is ability to
automatically wrap lines that exit the viewpoint,
so this sculpt word wrap.
To enable this, I'm going to open up
preferences and enable word wrap.
I'm also going to show visible glyphs,
so I can see which lines are wrapped automatically.
As you can see, the lines are now wrapped and I have
visible glyphs showing me which lines are wrapped automatically.
This is also done dynamically.
So as I change the window size,
you also get a change in the Word wrapping.
This is a great feature if you often change the size of
your window but want to keep all your code in the same view.
One of the great characteristics of
the new editor in Visual Studio 2019 for
Mac is that it's based on
the Visual Studio 2019 for Windows Editor.
That means, that we get new features
the same time as our Windows counterparts.
Let's take a look at some of those features together.
One of these features is that we now have
the same code analysis tools as Visual Studio for Windows.
Let's take look at how that works.
So here, I have an error,
I can not find the definition of people within my item class.
So let's see what we can do.
I can type this in manually or
I can see if there's a quick fix available.
So by hovering over people,
I see a light bulb here.
On the left this light bulb is the area indicator which to me
means that there's something that needs to be
fixed for my application to compile.
I'm going to expand it and see that I have
an option to generate variable people.
So I'm going to click on generic property item.name people,
and that is going to add
the property I need to build my project. Let's see if that worked.
In addition to being based on
the same editor as Visual Studio 2019 for Windows,
the editor in Visual Studio 2019 for Mac,
is also native to macOS.
What this means is that you get access to
all the features of macOS within the editor.
Let's take a look at a few of those.
One of my favorite features is ability as
native input methods and emoji support.
So let's add a comment saying that,
"We finally completed this class."
By doing the common keyboard shortcut in macOS
to enable the emoji selector, control command space.
I am giving the ability to add emojis directly to my code.
Everybody's favorite feature,
we all need more emojis in our lives.
Perfect, we added that.
Now, a more functional feature,
native input support, is ability
they quickly add accented characters.
All you have to do, is do a long press on a key once
enter and a macOS character selection screen comes up.
Here, simply click the number that corresponds to
character you want and it will be added to your code.
Additionally, the new editor has support for
right-to-left languages such as Arabic, Persian, and Hebrew.
To use right-to-left characters,
all you have to do is type in the right to the string or
paste right so that string and editor will take care of the rest.
Let's add a comment, says welcome to the editor in Arabic.
I'm pasting in the comment and as you can see,
it immediately detects that's a right-to-left language and
reverses the comment to start on the right side.
With right-to-left support and
bidirectional tech support in the editor,
you can ensure that all languages are supported in any context.
Today, we support the new features
within Visual Studio 2019 for Mac.
This included native input support,
support for right-to-left languages,
word wrap, and multi-caret editing.
If you would like to learn more about Visual Studio for Mac,
please check out aka.ams/viasmacdocs
or join us the next video in our series. Thank you.