So, code blocks (which can be collapsed like #region blocks) have corresponding markers (+ symbols) to the left of the text editor. These markers should be placed right where the code block starts. My problem is that they are shifted upwards a bit.
Here is a screenshot in case I didn't explain the issue clearly enough: http://img191.imageshack.us/img191/3489/04071173010.jpg
upd: This behavior was caused by an extension (thx Nija). In my case it was Presentation Zoom. However disabling and enabling it again fixed the problem.
Thanks for help!
Try deselecting automatic outlining mode by going to Tools > Options > Text Editor > C# > Advanced and unchecking "Enter outlining mode when files open".
Restart Visual Studio.
If that doesn't work, try installing the Productivity Power Tools addon, which add more flexibility to the existing Visual Studio features and may correct your outlining.
If all else fails you might have to do an uninstall / repair.
The thing that often helps me in this situation ... is to quickly delete all the xmlns namespace definitions and then add them back with undo (Ctrl-Z).
I know, odd, but it often works.
Related
I do not know how, but when writing code, two panels open for suggestions and both are opened in a row. Unfortunately I couldn't find how to solve it.
These things sometimes be caused by plugins like CodeRush and Resharper that working together. I think it is necessary to use only one of these plugins. But I am not sure. The problem seems to be caused by the window being unable to be adjusted.
You can follow these steps from Visual Studio.
Window -> Close All Documents
Window -> Reset Window Layout
Exit Visual Studio to be sure, then go back in.
When the same happens to me, update:
In fact, the overlapping things are that both Resharper and IntelliSense show completion list after a character is typed. To prevent this, it is necessary to turn off either the Resharper or IntelliSense related feature. I prefered to close IntelliSense's completion list with help from this site. For this, I followed these steps:
From Visual Studio, select “Tools” > “Options“.
Select “Text Editor” in the left pane.
Select the language you are using (C#, C++, Basic, etc.).
For C# and Basic, choose “IntelliSense“. For C or C++, choose “Advanced“, then scroll to the “IntelliSense” section.
For C# and Basic, check the “Show completion list after a character is typed” to disable it. For C/C++, you will have a few options, such as “Disable Auto Updating“, “Disable Squiggles“, and “Disable #include “Auto Complete“. Set any of these to “True” to turn them off.
I was wondering if anyone has had any luck disabling the HTML element tooltips in Visual Studio 2015. I find them to be a real annoyance, especially when dragging/ctrl+dragging text around (they get in the way most the time). Here's a screenshot the feature in action (updated):
I Googled and was only able to find the post where the feature was announced, but no mentions of how to disable it. I checked my Visual Studio preferences and have "Auto list members" and "Parameter information" disabled for the HTML text editor.
Any ideas or suggestions?
Update (10/16/2015): I think this issue may be related to the Web Essentials package. I disabled the package and was able to make the tooltip show up, however, I don't currently have a computer with a default Visual Studio 2015 install to test my theory on. I updated the screenshot to reflect the actual tooltip I'm getting (the original one was the screenshot included in the linked blog post).
Try this:
Go to: Tools > Options... > Text Editor > HTML > General
In the 'Statement completion' section you will see an 'Auto list members' checkbox, uncheck it.
However, I'm not sure if the feature above reffers to an in-design html editing or will only affect in specific html development environment (editing an html file for example), so I'll give an additional solution:
Go to: Tools > Options... > Environment > Keayboard
Here, find the command Edit.ToggleCompletionMode and assign the keyboard shortcut that you desire.
Then just use it when you wish to toggle the auto completion of members (including html members I supose).
Update
Sorry If I confussed what you want, because with the absence of auto completion it will remove existance of tooltips but I don't know if you need auto completion suggestions or not.
Anyways, for tooltips you could try doing the same procedure I explained in the images above but with the "Parameter Information" checkbox and/or the corresponding keyboard shortcut, Edit.ParameterInfo. Because seems that html element tooltips are treated as parameter info.
This was annoying the Hell out of me as well & I found that ElektroStudios' solution wasn't suitable in my case. I'm fairly sure that they are VS-native (definitely not Web-Essentials or ReSharper).
For VS2015 at least, the offending tool-tips are located within the file:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Schemas\1033\HTML\html.loc
Deleting the contents of this file has "disabled" the tool-tips for me, although I can't say whether this will be a permanent fix.
I have Visual studio 2013, resharper 8.2 and the productivity tools power pack.
My visual studio has 3 combos at the top of the code editor instead of the normal 2.
The combos are:
project, class and members.
I want to get back to normal:
classes and members.
Any idea which of the following is causing it, and how ti disable this specific features?
I don't think as things currently stand that you can disable it, but its name is apparently "Context Switcher".
According to this MSDN blog, it would appear to be a new feature intended to help you manage shared files in Universal Apps. I agree that it's confusing, and I'm not a big fan.
A thorough search of the VS options for anything related to "Navigation Bar", "Context Switcher", or "Universal Apps" comes up empty and there don't seem to be any extensions offering this capability either. As far as I know these would be the main avenues for configuration, so my conclusion is that we are stuck with it until the next VS update or until someone gets around to making an extension that can disable it.
If you prefer, you can disable the navigation bar entirely in "Tools > Options > Text Editor > All Languages > Navigation Bar" (or you can disable the bar on a language by language basis.)
Update: As of Visual Studio 2013 Update 3, you can drag and adjust the relative sizing of the 3 drop down lists in the navigation bar.
From a little local testing it looks like the sizing you set is shared between all files and solutions and it persists after closing and reopening visual studio.
I shrank the context switcher down to just the visible text, and it feels more well proportioned and closer to the classic Class and Member drop down layout.
The answer comes from this Stack Overflow page
Is there a built-in feature or available add-on for Visual Studio 2010 that will clean up spacing in C++ code so that annoying blocks like this:
RandomVar=RandomList.RandomMethod();
will become
RandomVar = RandomList.RandomMethod();
(Same goes for spacing in loops, etc.)
...or do I need to do this myself with find/replace and regex?
I think You are looking for Edit->Advanced->Format document. This will re-format your current document according to settings in Tools->Options->Text Editor->c/c++->Formatting.
It's keyboard shortcut Ctrl+E+D in my case.
Although originally for C code formatting lint has been modified to cover C++ and ported to many platforms.
Some lint variants only report inconsistent layout, others can fix it for you. some are free others paid for versions.
This would be an outside the IDE fix as this is a sperate tool (at least traditionally it is!)
This wikipeadia article lists a few possible sources for lint tools
(this was a footer in my orginal question, but as that posed two solutions I extracted it here so you can accept a specifc answer should you find one apropriate)
This is not a proper "Solution" but a possible work-around without the need for finding external tools
In the "Tools" menu pick "Options..."
In this dialog navigate to
"Text Editor -> C/C++ -> Formatting"
Set the layout options as you
would like your code to look.
Click OK.
Now in a unit with "bad"
formatting from the menu select "Edit->Advanced->Format document" and the IDE wil reformat the
document to match your settings.
For C#, VB etc the "Formating" option has several sub nodes that provide a fine grain of control for the sort of spacing options you ask for. The list for C/C++ is flat and very limited by comparison. I suspect there is not enough flexability for the layout you want.
So you probably cannot get the formatting you want directly. How about...
Set the spacing rules you want for C++ in the C# settings
Temporarily adding a C# project to your solution
adding a class to that
emptying it.
paste the C++ in (causing a reformat)
copy back to the original file
rinse and repeat
remove the temporary C# project
I have to say this is not pretty, but given the syntactical similarities between C++ and C# its probably a close match.
The auto-formatting settings for C++ in Eclipse are more extensive than in Visual Studio, so I ended up using that instead.
I have this very annoying problem that in Razor Views the Enter, Backspace and the navigation keys frequently do not respond. I have to restart VS to get it back to normal again. Am I missing something?
I had the same problem and solved it by saving the razor file (Ctrl + S). Once I did this I could use the Enter, Backspace and Navigation keys again.
I believe that Alt + Enter may also work.
I don't often get into this state and the above solution does not solve the underlying problem. I believe that it may have something to do with ReSharper but have not figured out if this assumption is true or not.
There are a number of pages that discuss this type of problem:
Link 1
Link 2
Link 3
Please try deleting the hidden '.suo' config from the solution folder.
I know this thread was created some time ago, but this may be an useful tip for someone.
This was happening to me in VS 2010, despite not using R#. After digging through those links #Ryan Spears put in his post I have come across a permanent solution Source. (Note that #Maffelu's solution did work for me, but it can switch back if I accidentally hit Left Alt + Shift).
This is also weird because Left Alt + Shift doesn't seem to change it back, so you have to go to the source: a key binding buried in the Windows Control Panel:
Control Panel > Region and Language > Keyboards and Languages > Change Keyboards > Advanced Key Settings > Change Key Sequence > Select "Not Assigned" for both Switching Input Language and Switch Keyboard Layout.
I've seen the same in Visual Studio 2013 and 2015 CTP.
None of the above solutions worked, but restarting Visual Studio did (after displaying the below warning).
I don't use ReSharper and this still happened. Pressing Control + Tab twice worked for me.
Something that worked for me:
Try Tools > Import and Export Settings... then only select Keyboard.
Search for Bkspce and see if it is being used for anything.
I accidentally had something Global bound to Bkspce, Bkspce which caused a very strange problem.
This happened to me when I installed ReSharper to a Visual Studio that has VsVim installed, and I fixed it by doing the following:
Uninstall VsVim
Reset the keyboard mapping to default in Tools -> Options -> Environment -> Keyboard
Set the ReSharper keyboard shortcut mapping in ReSharper options. (I use ReSharper 2.x or IntelliJ IDEA), and make sure Enter, Backspace, etc work.
Install VsVim and configure its keyboard options.
This issue occurred for me (in VS 2019) after installing a visual studio extension. So try removing any recently installed extensions.
The extension I used was File Nesting.
Note: System reboot didn't fix the problem.
Resharper could be the reason.None of the solutions above worked for me.
First check if Resharper is the problem.
Simply navigate to Tools > Options > ReSharper > General > Click suspend Resharper.
After taking steps above, if it works now as expected,then your problem could be caused by cache.
Clear cache following by the navigation below.
Resharper > Options > General > Clear caches or erase them manually
Or problem can be caused by not matching script tags in the cshtml.(Weird but it was the case that causes my problem)
If you have too many files open in Visual Studio 2010 then Enter or Backspace key will stop working intermittently. Try closing some files and Enter and Backspace key will start working.