Search between 2 files in Visual Studio 2017 - search

So I have recently switched from VS2010 (which just kept crashing at least every day) to VS Community 2017, and one of the things I used to do basically all the time, which is to select the name of a function/variable in one file, ctrl+F it then switch to a different file and search for it there, I just can't do anymore because of that stupid quicksearch bar.
However, the reflex to do that is so deeply ingrained by now, that I often end up opening the quick search in one file anyway, then switching file, then facepalming with a grunt as I go back to the previous file, ctrl+c, then back, then ctrl+f, ctrl+v, then enter. You can see how that can get frustrating with 20+ occurences a day. (yes, I swap-search through files a lot. It's how the projects I work on are designed, and it really worked just fine before they prevented me from doing that one very important little task quickly. Ugh!)
I have searched all around for a solution to this, but the common "Fix" is to map ctrl+F to the "search all files". It doesn't do what I need to do. If I switch the "search in" option back to "current document" (I know which file I'm looking into! I don't want to look through ALLL open files, or the entire project, just that one other file that's not the one I have open right this second), IT GOES BACK TO THE QUICK SEARCH BAR!!!
I can't be the only one with that search-switch file-find workflow. Is there an extension I missed that would fix this? Some kind of hacky registry modification that would give me back my good ol' search dialog without that annoying quick search? (Seriously, I had the power tools or whatever extension that had this in VS 2010, and had turned it off literally after the first time I used it cuz I hated it). Or! Hey, maybe something that'll at least keep that little box open/preserve the search value between files.
The time I spend having to go back and copy instead of right up search is making the switch to vs2017 almost irellevant vs the once a day crashing of vs 2010.
Thanks guys!

Related

MS. VBA Debugging "Run to Cursor" not working

Hello all,
this has me quite baffled as I dont even know how to even search for a solution to this.
Basically the problem is that when I'm debugging, after I stop the code in a breakpoint, the debugger can only go line by line and seems to not be able to "Run" (with F5, just continuing executing the code) or "Run to Cursor" to execute the code until the position the cursor is.
This makes of course very difficult the debugging, especially in cases where you just want to skip over a for-loop with 300000 iterations and not go through it one by one...
I have somehow found a workaround, although not really: I can set a breakpoint at some point down the code and select "Step Out" (Ctrl+Shift+F8) and the program will execute until the next breakpoint. This is far from ideal as I need to be setting and removing the breakpoints instead of just placing the cursor where I wanted the program to go and click Ctrl+F8. This operation is something I probably do hundreds of times while I am debugging and now I just go so much slower.
I wondered if any of you encountered this problem and know how to fix it or change this behaviour?
I should mention that the issue came when I changed my computer for a new one. I'm using Microsoft Visual Basic for Applications 7.1 within MS Excel in Microsoft Office 365

Search-Everywhere in Android Studio (IntelliJ) makes Search File redundant?

In Android Studio (and IntelliJ), shift-shift is used to Search File (and Everywhere, e.g. class name etc).
I just realize it also have shift-command-O that search for a file.
With shift-shift, it seems to me shift-command-O is redundant.
So I'm checking to see if I have miss something that is in shift-command-O but not in shift-shift?
Shift-Shift shows a popup with occurrences of the string you've entered in names of files, classes, symbols and actions. Shift-Command-O shows a popup with occurrences of the same string only in names of files. Same task, same UI (in recent IJ/AS versions) more narrow filter.
Well you're almost right but there is one main difference in those two commands.
Shift shift will search for a file.
While shift-command-o will go to the specified file.
I guess in a way they to de same, but if you use Shift-command-o you will be redirected to that file and saves you one click.
But feel free to use what you want, shortcuts are for convenience so you should use what is most comfortable.
Here is a link with all shortcuts in IntelliJ IDEA, could be usefull in the future :)
https://resources.jetbrains.com/storage/products/intellij-idea/docs/IntelliJIDEA_ReferenceCard.pdf

Visual Studio 2012: "Navigate To" is suddenly very slow

I've loved Visual Studio's "Navigate To" tool (Ctrl+,) ever since it was first introduced - rather than navigate through my folder structure I could just find the file or class I needed by name. The key has always been that the lookup was instantaneous - it would show all matching results as quickly as I could type.
Now something has changed and there's almost always a big lag before any results come up - I've measured it as long as 10 seconds sometimes. This is about 5 seconds into a search that has only one result and should have come up instantly:
That progress bar also jumps around in a bizarre way.
Any ideas what might have changed, or what I might do to get back my speedy old Navigate tool?
I had the same problem and deleting everything in c:\Users\UserName\AppData\Local\Microsoft\WebsiteCache\ helped. Now it's quick again.
I've found this soultion here.

Ctrl-Tab behavior in Visual Studio 2012

Question: Is there a way to make "ctrl + tab" behavior the same in VS2012 as it used to be in VS2010?
Specifically, I noticed that when you hold control and hit tab a few times, the list on the screen now ALSO includes windows that you wouldn't normally care about (much less want to switch focus to) such as: "Find Results 1", "Error List", and "Output".
These are those standard windows you typically have positioned at the bottom of your Visual Studio environment. Before, in VS2010, these types of items would not be included in the list. It was simply and easy to Ctrl-Tab to only the documents you had open. I use this feature quite a lot in order to quickly navigate amongst open files.
But now in VS2012, when you hit Ctrl-Tab and suddenly your focus is down in the error list.... its like.... what were they thinking?? You have to hit tab again to get past these useless choices, which just slows me down. If anyone knows a way to turn off this horrible new "feature", please let me know! :)
This does not happen normally.
You probably docked those windows as documents rather than as tool windows.
To check whether that's true, try docking a regular document window to the side; if you can't, that would mean that you have a vertical document split.
To fix it, undock those windows, then re-dock them using the lowest arrow.

VBA editor auto-deletes spaces at the ends of lines

Is there a way to convince the VBA editor in Excel to stop auto-formatting lines to remove the space at the end when I pause in my typing for a quarter second?
I had this exact problem and the following worked for me.
Click the Microsoft Office Button, and then click Excel Options
Click the Add-Ins category
In the Manage box, click COM Add-ins, and then click Go.
Look for an add in called 'Load Test Report AddIn' then uncheck it
restart excel
This addin is installed with VS2010 Beta2
In Excel 2010, toggling Design Mode button on the Developer Ribbon Tab solves the problem for me.
I've definitely had that issue before, where the vba editor would format as I was typing (not just when I went to another line). For me, it seemed to be related to a Microsoft Web Browser control that I had in an open workbook. When I took out the web browser, the VBA editor started acting normally again. I have no idea why that worked, but it did. Now I avoid using that control in my workbooks.
Something is causing your spreadsheet to recalculate while you are in the VBA Editor and this 'compiles' your code and thus strips the spaces. You need to stop the cells recalculating while you are editing. Turning the calculation to manual in the spreadsheet.
Tools > Options > Calculation should do the trick.
I noticed this when I had cells recalculating thanks to a DDE connection.
There is sort of a way to turn off the auto-"correction" in the VBA Editor.
Tools Menu -> Options -> Editor Tab -> Clear the Auto Syntax Check box
Sadly, this won't solve all your problems, as the VBA Editor tends to have a mind of its own, for better or worse.
Taking it out of design mode fixes it every-time on vba2003 - its was driving me crazy at first ... i did notice it might have something to do with the web control but when i take it out of design mode it works fine ... just toggle that to get it to behave :)
I have had this same problem several times recently, and has driven me crazy.
After reading this post all the different fix-ups mentioned (none worked for me), I recalled I have been playing lately with Internet Explorer Control, opening Internet Explorer from VBA.
This is mentioned in some of the answers in this post.
This got me in the right path and, in order to fix it, I had to first delete all iexplore.exe instances (alt+control+delete), closed Excel and open excel again.
(iexplore.exe had been opened invisible from the VBA code, and I didn't know they were running)
That fixed the bug.
I have been programming quite heavily with VBA for over 4 years, and never had this problem.
Just a couple of weeks ago I started using IE control, and I started getting this problem...so in my case I can only assume the bug is directly related to the IE control.
I am running both excel 2003 and 2007 in same PC at the same time, and the problem only happens with excel 2007.
None of the above for me.
I had a Application.OnTime timer that fired every second and this triggered a recalculation of something: commenting it made my day.
This has started happening to me recently after adding a Timer event to an Access 2007 form. The VB editor "finalizes" the current line (as if you had moved the cursor off of the statement; I have auto syntax checking off) each time the event fires (initially I had it set to 1 second, now it is set to 5 seconds, and the behavior scales accordingly). In order for the event code to execute, the application has to ensure that it has been compiled. Presumably, the editor needs to be in a "sane" state to do this, as it probably has to check for code dependencies among modules. Note that the behavior occurs regardless of whether any dependent code is actually loaded into the editor at the time. Note also that resetting the execution state doesn't affect the timer event firing. As a practical matter, one could close the triggering form, switch it to design view, set a breakpoint in the triggered code, or increase the timer interval while working with the editor.
In contrast to abhishek's comment, changing the settings of Tools/Options.../General/Compile On Demand and/or Background Compile did not affect the issue.
If it helps, none of the previous answers solved mine. Only solution appeared to be to close the xls file and reopen it. Frustrating to have to do every 30 mins but at least it works. Would love to know why it's recompiling and cleaning the text... should really be an option to disable the text cleanup but couldn't find it.
Turn off Tools > Options > General > Background Compile. This solved it for me.
This is a long standing problem that could have various causes. I had this same issue occur in the Access VBE (so naturally the Excel answers weren't relevant). After a LOT of digging I finally got it fixed with the solution below. First a recap though:
If you are here because of this issue in Excel, try the solutions above first. To summarize:
The most common issue in Excel is that the Design button is toggled. Toggle that and see if the behavior changes as submitted by Dmitry Frenkel above
If that doesn't work, check for the "Load Test Report" AddIn as mentioned by Ade.
Those are really the two main causes in Excel, but if neither of those solutions work, then scroll through the rest of the solutions here. All are valid possibilities for the cause. In Access the cause is pretty straight forward. It's a timer issue on a form somewhere. I found this solution from here by User Kevin K. Sullivan.
Copy the following line of code onto the clipboard. (You might need to
paste it into a text editor first and coerce it onto one line, depending on
your newsreader. It must be one line.)
For i = 0 to Forms.Count -1: Debug.Print Forms(i).Name, Forms(i).TimerInterval: Next i
Switch to Access.
Press Ctrl-G to go to the Immediate Window.
Press Ctrl-V to paste in the code.
Press enter to to run the code. All open forms will be listed. Any non-zero timer intervals are your culprits. Simply close that form (It may be invisibly open from another process than the one you thought you were dealing with).
I think the solution for Access here is what the user Dom was trying to say above. I guess the down votes were because it wasn't explained very well and/or because he was speaking of Access when the OG issue was in Excel. Regardless, he is likely on point if you are here because of the VBE in Access.
I hope this helps people. I know I kept finding this page when researching this issue, so that's why I thought I'd update this solution here.
I hit this problem today on a fresh install of Excel 2010 Beta 2. None of the above made any difference, but going into the trust center and disabling all application add-ins fixed the problem for me.
I have Office 2010 Pro and I had the same issue. As I type the space between each word was being deleted. After trying each of the options turning them on and off the only way I found working was to disable the Winzip Courie(excel) add-in. This is done thru the Options dialog box Add-Ins section.
In office 365 I had the same issue - what worked for me is I saved the file with a different name and when I re-opened the new file the problem went away.
I found this issue pops up when I had AutoSave on. Turning that off let me code without it compiling every second.
I don't think I've ever seen the VBE remove a space when I've stopped typing. It will remove trailling spaces from lines if you move to another line, but that's something different and not behaviour that I think can be altered.
The removal of spaces in the VBA editor for Access occurs when a form is open in Form("Execute") mode. This is probably due to background executions based on "On Timer" methods. Close the form in Access solves the problem in VBA.

Resources