How to stop VS Commnity 2022 from auto inserting closing tags in cshtml files? - visual-studio-2022

I am returning to programing after a 3ish year break and am now trying to use VS 2022 Community. I am writing an ASP.Net Core application using MVC and as I am writing my HTML markup in the .cshtml file it keeps auto-inserting the closing tag. I HATE this function but I can't find a way to turn it off. I have gone though and unchecked every "closing tag" auto insert I could find under Options -> Text Editor and even restarted the application but it still does it. I don't know if I missed something or if this is now not an option but can anyone tell me how to shut this off? If it makes any difference the file is in /Views/Shared/ folder.
Also, yes. I did try googling for this and everything I find that is relevant applies to VS code which is very different.
If this is the wrong forum for this question please point me to the right one and I will remove this and ask over there.

I checked over the various settings as you did, and it seems that this is not an option anywhere.
Under Tools → Text Editor → HTML → Advanced there is an "Auto insert closing tag" boolean. Setting it to false, it doesn't work for .cshtml files - only regular HTML files. Since there isn't any .cshtml specific setting under the text editor section of the options, I don't think this behavior can be changed.
The "best" workaround I found was immediately performing an undo (Ctrl + Z) after the ending tag gets automatically inserted will remove it.

Related

PhpStorm AutoComplete code is not working

I'm using PhpStorm over 3 months and it's a good IDE. I do not know what I've clicked yesterday but since yesterday I have issue with code completion in CSS mainly.
On the screen I have VS Code and PhpStorm and also I've opened the same project.
In VS Code it works perfectly. In PhpStorm it doesn't. I tried some Google First Aid like clear cache, update the IDE, turn On/Off Safe mode etc. but nothing changed.
My Code Completion settings:
Based on your PhpStorm editor area screenshot (many thanks for that BTW: not many people do post it even if asked), all your CSS files are treated as a Plain Text. It's rather unlikely to be a glitch, more like accidental settings change.
Settings/Preferences | Plugins -- make sure that CSS plugin is enabled. If not -- enable and restart the IDE.
If still the same: Settings/Preferences | Editor | File Types -- locate "Cascading style sheet" entry and make sure that it has *.css pattern there.
If not there -- it's possible that you have somehow reassigned it to "Text" file type. If it's there -- just add *.css to Cascading style sheet patterns (it will remove it from Text when doing that).
If still nothing: you would need to provide more/new screenshots.

How to keep IntelliSense Complete Word option off?

IntelliSense has a mode where if you hit the spacebar, it will automatically type out the suggested auto-complete word. In order to prevent this from happening, you can hit the Escape key before pressing Space. This will close the autocomplete popup, so that the suggested word is not automatically typed.
I prefer the alternative setting, where I actually have to hit the Enter key to accept the suggested autocompletion. If I just type Space, I want a space to follow the characters that I actually typed.
I know that I can toggle between the undesired mode and the second mode I describe, which I do want. To do this, I click Edit -> IntelliSence -> Toggle Completion Mode.
My problem is that this setting never sticks. It constantly reverts to the wrong mode. I'm not sure exactly when it's changing, but it seems to revert back several times a day. If I change this for one Solution, it won't apply to my other Solutions. Even if I apply it to a solution, close VS, reopen, and start working again, it will have reverted.
Does this happen to everyone else, or is this unique to me? Is there some global setting that forces this feature to stay off always? Do I have a corrupted file somewhere that's causing this?
No, this is normal behavior and this setting behaves like what you described in the previous VS versions.
However, thanks to those members who is reporting this issue and Microsoft has fixed this behavior in the latest VS2019 version.
Since VS2015 is not supported by Microsoft so far, so this behavior cannot be fixed on VS2015 and I suggest you could install the latest VS2019 Community and get what you want.
Once you click the Toggle Completion Mode under Edit-->Intellisense, no matter you close VS, create a new project or a solution, use other c# file editor, it will never revert back.

Visual Studio - Opening a control reorganises designer.vb

Just wondering if anyone knows the answer to this one. I am running VS2015, and some colleagues are running VS2013. We are all running our code through TFS for source-control, and we encounter this issue quite a bit.
When we open a form or a control, not even modifying it, then close it, it will completely restructure the *.Designer.vb file, but not modify any data (at worst, it's simply put the upper casing of True/False to true/false).
This proves an issue as we are becoming increasingly wary of working on the same forms as one another.
Does anyone know a potential fix to this, or if this is a bug of sorts?
Thanks!
The VB code use PascalCased keywords.Even though you write the keywords in lower case and VS would auto-casing to PascalCase.
However,there is a way to change to Lowercase Keywords:
Download Glamour from the GitHub repo.
Install it by drag/dropping the truetype font (.ttf) files in your
%SystemDrive%\Windows\Fonts folder.
Change your text editor font in the Tools > Options > Fonts & Colors
dialog to Glamour.
Select "Keyword" in the "Display Items" list and check the "Bold"
checkbox.
Finally you got this as below:
This method is referenced from Anthony D. Green's Blog. More detail: http://blogs.msdn.com/b/vbteam/archive/2015/04/02/lowercase-keywords-revisited.aspx?PageIndex=1#comments I was wondering anyone of your team are using the lowercase keywords cause this.

Disable apostrophe t space Intellij IDEA

When I type in a comment (JavaDoc or line comment) IntelliJ automatically inserts a tag when I type something like // don't and I hit the spacebar after the 't I see // don'< ></> with my cursor ready to type in the first tag. Does anyone know how to disable this behavior? I've tried google searching and searching through the settings with no avail. I'm using IntelliJ IDEA 13.0.1 community edition.
It sounds like a live template is being activated via the sequence tspace, although to the best of my knowledge this is not a default one. Go to File > Settings > [IDE Settings] > Live Templates. Search for a template that has t as its shortcut and inserts tags. Either delete it, or change its activation from space to tab (in the lower right). You may also want to check (and possibly change) the "default expand with" setting at the top.

How to see live list of syntax errors in WebStorm 7 (or IntelliJ)?

While editing a JavaScript file, the IDE shows highlights on the lines that have problems and displays the lightbulb when you're on one of those lines.
How can I see a live list of all problems found in the current file (e.g. syntax errors)?
The only way I found so far was to manually run inspection and check the inspection window. That's quite cumbersome. Even the "Problems" section of the Project window updates itself automatically as soon as I change the code (even without saving) - but it doesn't display the actual errors (only which files have errors).
Apparently the IDE knows what errors exist in the file - I just can't find a way to see all of them in a list.
In every other IDE I know, it is a built-in, enabled-by-default, feature: eclipse, visual studio, brackets, etc.
Apparently this is an open issue on the IntelliJ family of products. Please upvote that issue if you feel it is missing as well!