Visual Studio Community 2022 for Mac 17.3.1 current column number - visual-studio-mac

Is there a way to show current column number of the cursor in code editor?

Visual Studio for Mac 17.4 preview 2 now has the line number, column number, and line ending information at the bottom right hand corner of the text editor.

Is there a way to show current column number of the cursor in code
editor?
Your photo indicates you are using Visual Studio, not Visual Studio Code.
VSC is more text editor oriented while VS is more IDE based.
VS only supports showing the line and column number of the cursor location in the Windows version of VS2022 at this time.
The column numbers are a feature of vscode in the 1.70.2 universal version I used.

Related

What’s “tabs are not allowed in f# code unless the #indent off option is used” Error?

what’s “tabs are not allowed in f# code unless the #indent off option is used” Error?
I use the last version .netcore and vs 2019. I want to use the lightweight syntax
When using lightweight syntax, you must use spaces, not tabs, for indentation.
Most editors have an option (including Visual Studio, by default) will turn a tab into spaces automatically when you type. I suspect this was written in a different editor and opened in VS.
In Visual Studio 2019, if you select everything in your document, and do Edit->Advanced->Untabify Selected Lines, it will correct it for you, as well.

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.
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.
8.1 Release Notes:
https://learn.microsoft.com/en-us/visualstudio/releasenotes/vs2019-mac-relnotes-v8.1
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.
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.
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"
Before format
After format

How to Reset Window Layout in Visual Studio for Mac

Is it possible to reset window layout in Visual Studio for Mac? I am able to do this for Visual Studios on Windows, but not on Mac version.
After piecing together various posts I found only a non-UI way to reset the layout. Starting with this doc: http://www.monodevelop.com/developers/articles/user-profiles/ but instead of using the path "MonoDevelop" use "VisualStudio". So in the case of a Mac the folder to visit is at "~/Library/Preferences/VisualStudio".
Once there I found the "7.0" subfolder had a file named "EditingLayout.xml"... With VS for Mac not running, I deleted that file and started it again. This restored all pads to their default state from what I can tell. In my case the "Application Output" window was still not available as a Pad until I actually did a Debug on a project, and then it was visible again in the View | Pads list (and no longer lost in the UI somewhere).
You can press the view tab to change the different layouts or create one of your own.
Additional informations can be found here:
https://learn.microsoft.com/en-us/visualstudio/mac/customizing-the-ide?view=vsmac-2019
I met this problem also, Visual Studio for Mac can't reset Window Layout in UI. But you can easily customize the Window Layout. Just select "View->Pads/Debug Pads" to decide what window you want to show on the dashboard.
enter image description here
Just to have a more up-to-date answer: when you quit Visual Studio Mac 2019, any changes made to the active layout will be reset to how the layout was saved.
From the Visual Studio Website:"There is always one active layout and any change you make in a layout, such as adding or repositioning a pad, will only change the active layout. Once you close Visual Studio for Mac, the changes you have made will not be saved." Visual Studio Website - Customising The IDE
I've tested it out for Visual Studio Community 2019 for Mac Version 8.7.8 (build 4), and now it really does just reset when you quit the app, unless you have specifically saved any changes as a new layout.

Visual Studio 2012 editor line of dashes not displayed correctly

Try entering following line of dashes in Visual Studio 2012 editor:
//--------------------------------------------
After 90 dashes it seems that the editor inserts 2 spaces. But it's not! If you copy and paste the line to notepad it reveals that the line of dashes are intact.
Feature or Bug ?
Definitely a bug, I've seen this as well and thought there is something wrong with my installation. They've released a feedback tool which can be used for bug submission. Try it: http://visualstudiogallery.msdn.microsoft.com/f8a5aac8-0418-4f88-9d34-bdbe2c4cfe72

Stand-alone text editor with Visual Studio editor functionality

Is anyone aware of any text editors with Visual Studio editor functionality? Specifically, I'm looking for the following features:
CTRL+C anywhere on the line, no text selected -> the whole line is copied
CTRL+X or SHIFT+DEL anywhere on the line, no text selected -> the whole line cut
Thanks!
Komodo Edit does the two things you specified.
I use it all the time as a secondary editor, for various scripting and other programming tasks. Tons of features, free, open source.
Zeus can emulate the Visual Studio keyboard.
To change the keyboard mapping just use the Options, Editor Option menu and in the Keyboard panel and select the MSVC as the active keyboard mapping.
(source: zeusedit.com)
Notepad++, UltraEdit and TextPad are good ones.
EditPad Pro will cut or copy the line the cursor is on when no text is selected. People sometimes report that as a bug.
Twistpad looks something like Visual Studio 2005/2008 editor and seems has the same key bindings, including Ctrl-X to cut whole line if no text was marked.
Slickedit
Not to steal Chris' thunder for his suggestions on Notepad++, UltraEdit, and TextPad, but I would like to point out that there is a version of UltraEdit which can be run from a thumb drive (for those people who lack Admin rights at work and can not install programs).

Resources