Microsoft Visual Studio 2022 - Stop All and Any Formatting - visual-c++

I absolutely hate that Microsoft Visual Studio reformats my code. I'm constantly fighting with it. Over the years I've tried several versions and numerous settings but nothing stops the blighter. It insists on reformatting everything and as a general rule making a mess.
Automated re-indenting and alignment when applying brackets\braces or pasting in C#, Razor, HTML and JS files are my main pain points.
Seriously, it's a productivity issue and it drives me nuts 🥜. I know this question has been asked many, many times before, but surely, in this day and age there's a way to simply turn it ALL off?! Please tell me somewhere out there somebody knows how to do this.
Reference: Using Microsoft Visual Studio 2022 17.3.0. Community Edition. No plugins (Resharper etc.). All settings reset to defaults (using Tools > Import and Export Settings Wizard, Reset all Settings)
Side note: I know other IDEs exist but some projects just need MSVC and I'm not looking to change editors. Although I'd accept answers which recommend a plugin guaranteed to solve the problem.

This will not fully solve the issue but hopefully will already help so I'll post it as an answer.
Even without Resharper there are a lot of options under Text Editor settings and this allows you to control (to a certain extent) how the IDE formats your code, but sometimes it's option A or B and not "both" or "any". This means depending on what you type formatting will happen anyway, however as most people always format in a particular way, spending some time tweaking this is worth so once it is done it will be much less painful. Also the vast majority of settings is per specific language and not in the same structure, which does not make it easier. For C# - Braces for example, here's where to start:
Settings > C# > Code Style > Formatting > New Lines: all "Place open brace..." settings
Regarding the other main pain point (pasting) these should help:
HTML
Settings > Text Editor > HTML > Advanced: Set "Format on paste" to False.
JS
Settings > Text Editor > Javascript/Typescript > Formatting > General > Automatic Formatting: Uncheck "Format on paste"
C#
Settings > Text Editor > C# > Code Style > Formatting > General: Uncheck "Automatically format on... (all options to disable all)

Related

Android Studio 0.8.2: Remove Vertical Line Break

Been searching through the editor settings for quite a while but I can't figure out how to turn off the vertical line break in Android Studios 0.8.2. Driving me crazy!!!
It was driving me crazy as well. For older versions (like 0.8.2), Open the Options and uncheck:
Editor -> Appearance -> Show right margin
More recent versions use:
Editor -> General -> Appearance -> Show right margin
AS 3.x:
Editor -> General -> Appearance -> Show hard wrap guide
With Android Studio 1.2.2
File > Settings > Editor > General > Appearance
Or you can just write in the search box of Settings: "right margin"
In Android Studio 1.1.0:
File > Settings > Editor > Appearance > Show right margin (uncheck)
update:
AS 3.x:
Editor -> General -> Appearance -> Show hard wrap guide
In Android Studio 3.1.2, Show right margin is replaced by Show hard wrap guide. (I don't know in which release, this change rolled-out)
Uncheck highlighted option and save. The vertical code line indents will be gone.
File > Settings > Editor > General > Appearance > Code Style > Hard Warp at
Even I'm afraid of down votes but I don't understand why you guys want to hide this line, don't you think it's really useful ?
It helps us know when we should make a new line to match coding convention (code-line width). And the short code-lines (max 80-120 characters) make your code:
Readability
Easier to review code before committing it to the repository (without horizontal scrolling).
Easier to track changes of the committed-history (without horizontal scrolling).
Work with two files at a time (Split vertically in Android Studio) (without horizontal scrolling).
This unbelievably annoying line is the default in various editors. Netbeans, Eclipse, LiClipse, VS Code, and now Android Studio Chipmunk 2021.2.1 Patch 1 for Linux 64-bit.
I had to click on File > Settings > Editor > General > Appearance and remove the checkbox on Show hard wrap and visual guides (configured in Code Style options).
I remember this used to be called a print margin or something in Netbeans. This vertical 80 character limit line is a tad hard to find in the IDE settings and often difficult to search the internet for the correct settings to disable it too. The variety of answers on this page shows how much the Android SDK team has changed the IDE too.
People have discussed the relevance of such a vertical line here, here and on various other websites. Since the percentage of people who hate it are lesser than the percentage of people who like/tolerate it, I guess IDE's are going to continue keeping it as a default.I wouldn't mind it if that line's colour was at least a lot more subtle.
This very annoying vertical line that you will find with the android studio chipmunk release by default. There is no easy way to disable it as it is difficult to find.
It is under
Preference->Editor->General->Appearance
Uncheck []show hard wrap and visual guide(Configure in Code Style option)
That works on chipmunk release.

resharper disable for c# .cs files

is it possible to only enable resharper for javascript and css files? I don't want it inspecting my c# files as it's driving me nuts with it's styling and and at times somewhat controversial recommendations. I haven't got time to set each individual setting, I'm just looking for a "don't inspect c# files" check box, if there isn't one I think my resharper trial will be officially over.
If you really want to disable ReSharper for C#, try going to ReSharper | Options -> Code Inspection | Settings -> Edit Items to Skip and add a file mask to skip *.cs.
But better way would be to disable those ReSharper warnings that you don't like. To do this, click Alt-Enter on the suggestion that you don't like, go to Options submenu, select Configure inspection severity and then Do not show. This is for ReSharper 8.0, in 7.1 it should be pretty similar.

Restore intellisense after ReSharper trial expires

I have a C# license for ReSharper, and a little while ago Jetbarins gave me a license key for a 30 day trial of ReSharper full. This has expired and I have gone back to ReSharper C#, and as a result have completely lost VB intellisense.
How do I restore normal VB.Net intellisense from within Visual Studio? Is there a way to do this without resetting all Visual Studio settings (I have changed a number of settings, don't want to have to go through and change them all again).
I had this same problem after my ReSharper trial expired.
The fix is to go to Tools > Options > Text Editor > All Languages.
Then under Statement completion, ensure 'Auto list members' and 'Parameter information' are checked (for me they were partially selected)
Just an update for VS2013, you can go into Tools>Options and find Resharper as it's own menu item there, then click suspend.
It seems to undo all the changes it made at this point and restore my original settings.
Also consider reenabling errors in about the same place: Options > Text Editor > C# > Advanced
Under "Editor Help" section, recheck:
Underline errors in the editor
Show live semantic errors
Source: http://resharper-support.jetbrains.com/hc/en-us/articles/206104078-Visual-Studio-IntelliSense-is-broken-after-uninstalling-suspending-ReSharper

Why do Visual Studio 2012 and ReSharper 7 forget to display Intellisense tooltips?

I noticed a strange behaviour in my VS2012 installation. I use VS2012 Pro and ReSharper 7. Intellisense is just not showing code suggestions anymore. I found a few related questions in my research but they always had a slightly different setup going and none could solve my problem:
Intellisense is working but, it's not showing the tooltip about selected member functions/Properties anymore.
If I take a look at the C# Text Editor Settings in
Tools -> Options -> Text Editor -> C# -> General
Most of the times the two necessary boxes Auto List Members and Parameter Information are selected. However, code suggestions in Intellisense don't work. Sometimes, when I look at the described settings, they are unselected.
Selecting them will make code suggestions work as in VS2010 but, only once. When I check the settings afterwards, they are most likely still selected, but code suggestions are not working anymore.
Some people suggested deleting the %AppData%\Roaming\Microsoft\VisualStudio\11.0 Folder, which did not work for me. I also tried to reset all changes, which also didn't help at all.
Tools -> Import and Export Settings -> Reset
What in the world could make Visual Studio to just forget its settings and trigger such an irrational behavior?
-edit-
I display the code suggestions by pressing CTRL+Alt+Space. However, I have to press that shortcut every time I want to see the suggestions. It has to be possible to automatically display them every time, when possible?
I was having a similar problem, but I kept overlooking one small ReSharper Intellisense setting. I would double check that you have Symbol completion on in
ReSharper | Options | Intellisense | Completion Characters
Check out the answer with screenshots.
Thanks for all the tips, I figured out what I had missing:
I had to enable "Completion Appearance" -> "Show Summary".
I also accepted Anthonys answer because he linked to a detailed post with screenshots that shows all steps necessary. (Although the thing I had missing is not mentioned there)
ReSharper uses it's own code suggestions that override Visual Studio ones, that could be the reason why the ones in the Visual Studio settings may be disabled. Please check ReSharper options at ReSharper -> Options -> Environment -> IntelliSense. Maybe they are turned off there. If your ReSharper options are turned on but you still have no intellisense, then please ReSharper's support at http://www.jetbrains.com/support/

Moving from coderush to resharper

I am about to make the switch to resharper from coderush after using it for 30 days and have some questions I would like to see if I can get some help on.
1: Can you change the resharper code colors? I tend to prefer dark themes so I would like to be able to migrate to a dark theme once the change is complete.
2: Do any other addin provide the member icon paint functionality of Coderush? It is the only feature that I do actually miss as it is handy for scanning. I don't mind paying for the functionality if it works.
EDIT: Found out how to change syntax colors.
There's no direct replacement of "paint member icons" in ReSharper.
I suggest that you use the File Structure window instead, with "Track caret in editor" and/or "Automatically scroll to source" options on to synchronize between focus in File Structure and the caret in the text editor.
As to other VS plug-ins, to my knowledge there aren't any prominent plug-ins that have that - neither VS10x CodeMap nor Productivity Power Tools provide anything similar.
1: Can you change the resharper code colors? I tend to prefer dark
themes so I would like to be able to migrate to a dark theme once the
change is complete.
As well as being able to change Resharper colours (In Tools->Options->Fonts and Colours, look for the "Resharper *" related options), R# supports Visual Studio light and dark themes:
http://www.jetbrains.com/resharper/webhelp/Managing_Color_Themes.html

Resources