Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable word wrap in Visual Studio for Mac?

I found a lot of examples and methods to word wrap in Visual Studio Code but not for VS for Mac. Currently, I'm using the Enterprise edition with the latest updates.

like image 538
Diomedes Domínguez Avatar asked Jan 31 '18 14:01

Diomedes Domínguez


People also ask

How do you wrap text in VS Code on a Mac?

By default, editor. wordWrap is off but if you set to it to on, text will wrap on the editor's viewport width. "editor. wordWrap": "on" You can toggle word wrap for the VS Code session with ⌥Z (Windows, Linux Alt+Z).

How do you text wrap on a Mac?

In the TextEdit app on your Mac, do either of the following: Choose Format > Wrap to Window to wrap text in the TextEdit window. Choose Format > Wrap to Page to wrap text within page margins. To change the paper size, choose File > Page Setup.

How do I wrap text around a box in Word for Mac?

Click the Format tab, and then under Arrange, click Wrap Text. Click the wrapping option that you want to apply.


2 Answers

As of VS Mac 8.1, Word Wrap is available via Visual Studio -> Preferences -> Text Editor -> General. You should see a checkbox option for Word wrap.

enter image description here

8.1 Release Notes: https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2019-mac-relnotes-v8.1

like image 192
andrewlundy Avatar answered Oct 13 '22 13:10

andrewlundy


Thanks to Matt Ward for let me know that this isn't implemented yet, but I managed to play around with the preferences. It's not perfect as VS for Windows, but it's close enough.

(Sorry that the VS for Mac is in spanish)

1) I made a few modifications in text files: 120 columns and remove the whitespaces at the end of the line.

Settings for plain text

2) Since I'm using a Macbook pro mid 2012 my screen resolution it's limited to 1280x80, so in XML files I set only 3 attributes per line, adjust the attributes and align the attributes.

Settings for XML and XAML files

3) I made modifications in C# but was only to set the system's using at the end of the block.

4) Finally, I made a keyboard shortcut for "Format the document" Format the document

Before format enter image description here

After format enter image description here

like image 29
Diomedes Domínguez Avatar answered Oct 13 '22 12:10

Diomedes Domínguez