Is there a way to automatically find all unused public functions in a solution? I have resharper, and right now I have to do a "find usages" on each symbol, which is tedious--it seems like there should be a better way
Of course there's a better way. Here's what you should do if you use ReSharper 4.5 or later:
Go to ReSharper > Options > Code Inspection > Inspection Severity.
Scroll down to "Unused symbols" category and set all containing items called "Non-private accessibility" to be shown - whether they're shown as hints, warnings, or suggestions is not relevant and is entirely up to you.
In ReSharper > Options > Code Inspection > Settings, check "Analyze errors in whole solution". Press OK to apply changes in ReSharper Options.
Right-click the solution node in Solution Explorer, and select "Find code issues".
ReSharper will display various code issues that it detects in your solution in "Inspection results" tool window. Specifically, under "Unused symbols", you'll see all non-private types and members in your code that are not used.
Related
I'm looking for a way to collapse my VB6 code.
I found an option but I really hate it :
Tools > Options > Editor Tab > uncheck "Default to Full Module View"
Is there a better way like the #Region "regionName" way used in the VB.NET IDE?
EDIT :
The two small buttons located in bottom left of the code window do the same as mentioned above
No, isn't possible.
About CodeSMART:
may only show the 'branch lines'.
As for the regions, they are simply special comments, but nothing more.
See
http://www.axtools.com/products-codesmart-vb6.php
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.
When I'm typing the value of an attribute and I hit space, it automatically jumps to the next attribute. I guess this makes sense when typing an id or something but it's really annoying when typing the class attribute with multiple classes. Does anyone know a way to change this behavior?
The behavior you describe is a function of the IntelliSense "auto list members" feature. You can work around the annoyance by disabling "Auto list members" for HTML. Note: you can also do this for other languages.
To disable "auto list members" for HTML go to:
Tools > Options > Text Editor > HTML > General:
uncheck "Auto list members"
Unchecking this option will prevent the "jumping" behavior you describe but will also prevent the IntelliSense list from automatically displaying. Probably not a big deal since you can just press CTRL+J to display it when you need it.
In VS, to use snippets (for example auto-implented property) I typed "prop", then hit TAB twice.
However R# (I'm using R#6) inserts the snippet after ONE tab, causing me to always mistype something.
Is there an option somewhere, where I can set it to use two tabs?
Unfortunately there's no way that I'm aware of that would let you reassign deployment of ReSharper live templates to two tab hits instead of a single hit.
However, until you've got used to the single-tab deployment, you can Shift+Tab to go back to the previous template hotspot, which prevents messing things up.
Another option would be to selectively turn off ReSharper live templates that conflict with Visual Studio snippets that you're used to deploy on a regular basis.
To do that, go to ReSharper > Live Templates, and in the Templates Explorer, under Live Templates, either deselect "Predefined templates" altogether or expand this category and turn off selected templates - in your example with "prop", you should turn off ReSharper's "prop" and propg (the latter is under "Imported Visual C# snippets")
While editing javascript content VisualStudio is starting to bug me with how it keeps inserting highlighted suggestions. For example it keeps inserting valueOf( if I type val(. This is really annoying.
I want to invoke intellisense manually just like I can with C#, is there any way of turning off the auto-complete suggestion or at least preventing it from selecting an entry for me?
In Visual Studio Tools > Options > Text Editor > JScript
In corresponding panel as Statement completion
Uncheck Autolist members & Parameter Information
I think that should do the trick
I realize resharper isn't mentioned in the question, however there is an easy solution if you're using it.
Navigate to Resharper -> Options -> Intellisense -> Completing Character. Once there, add ".val(" to the "Do not complete on" text field beside the JavaScript row.
Like so:
I tried Myra's solution but it didn't solve it completely for me due to ReSharper. Turned out it was the ReSharper intellisense that autocompleted whatever I was writing to the current/top option in the intellisense list, not the VS default intellisense.
I fixed this by turning off ReSharper's JavaScript support completely by going to ReSharper -> Options -> Products & Features -> Uncheck JavaScript and TypeScript.
This might not be a good solution if you depend on any other JavaScript- or TypeScript-related features in ReSharper but I finally got control of the intellisense. Peace, at last...
(Just to be clear, I still have the "Autolist members" and "Parameter Information" options as described in Myra's post above checked/activated, and the "Only use Tab or Enter to commit" option as described in Brett Ryan's comment above also checked/activated)
for me it was also resharper (replacing my .each with .forEach), and what I did is go to
menu
Resharper -> Options
Environment -> IntelliSense -> Autopopup
select JavaScript tab
"After dot" -> select "Display but do not preselect" in the dropdown