Ctrl-I in Visual Studio 2010 - visual-studio-2010

The Ctrl+I "incremental search" feature is great in the sense that it avoids showing the Find dialog box (which obscures your screen).
However, Ctrl+F does have an advantage in that it centres the code vertically in the middle of your screen.
Is there a way to make Ctrl-I centre the code in the same way?

Don't think there is. So I've mapped the command "Edit.ScrollLineCenter" to Ctrl+L and just interchangeably hit CTRL+I and CTRL+L while scanning through the source with incremental search.

Related

Pin Find & Replace dialog

In Visual Studio 2013, is there any way I can keep the Find & Replace box pinned in the corner, as in the image below, when I move between files?
I have 10 documents open. I know I want to do search in say 3 particular files only. So All Open documents or All Files doesn't make sense.
Right now as soon as I go to second document, the box disappears. I have to do Ctrl+F for it to come back.
I know I can do some docking but I want to keep it in that corner as it is very convenient and occupies less space.
You can click your solution/project and click Ctrl-H to open the find and replace window from there.
Just a reference, as this helped me out so posting here to help others.
Pressing CTRL + F opens up "Quick Find" which will open a small dialog box in the top corner of the file and will jump around all the files you are searching.
Pressing SHIFT + CTRL + F opens up "Find in Files" which will open up a bigger dockable dialog box which you can have floating or dock to the windows. This does take slightly longer to search, but im sure if you configure the find settings it will be quicker. The plus for me was the docking aspect.
This is on VS 2019, not sure what other versions this might be on.

Visual Studio - keyboard shortcut to move caret/cursor to start or end of selection

Years ago I read about a visual studio shortcut which, if you had a selection, would move the caret/cursor to the start or the end of the selection.
I've tried searching for it, but can't for the life of me find it again.
In the image below, the text is selected and the caret is at the end, (highlighted pink). This shortcut would move the caret to the start of the selection (highlighted yellow).
Does anyone know what this shortcut is?
I'm pretty sure that this the command called Edit.SwapAnchor. The documentation says that this command:
Swaps the anchor and end points of the current selection.
The keyboard shortcut probably depends on your IDE configuration (i.e., which language you indicated that you primarily develop in on first launch), but in mine it is mapped to Ctrl+R, Ctrl+P. That's the default for C++ developers, matching the default shortcuts for VC++ 6.
Edit:
Indeed, this is the one you're looking for. According to this post on the VS Tips & Tricks Blog, the keyboard shortcut is Ctrl+K, Ctrl+A.
And back in VC++ 2 it was mapped to Ctrl+Shift+X. :-)
I'd open up Tools -> Options -> Environment -> Keyboard, type in "swapanchor" in the search box, and see what it's mapped to in your environment. If you use it frequently, change it to something memorable.

Visual Studio 2008 Report Designer - can't turn on gridlines

Microsoft in their infinite wisdom have seen fit to remove the useful "Draw Grid" and "Snap to Grid" checkboxes in the report properties dialog that were in VS 2005 but are not in VS 2008. I'm assuming they put that functionality elsewhere but I can't find it after going through what seems like every menu option available. Does anybody know how to turn on the gridlines?
right click menu
h ttp://i37.tinypic.com/2vijfck.jpg
report properties dialog
h ttp://i33.tinypic.com/2yvnhus.jpg
You absolutely sure you're using VS 2008? - looks like the 2005 dialog to me
There´s no how to do it, microsoft just took it off, because now the objects align with other objects, and you have 3 options to move the objects now, with mouse, by selecting the object and moving with your arrows in keyboard, which moves around 0,30 cm, and by holding ctrl and pressing arrows, which is more precisely.
There´s a lot of people complaining about that, maybe they will put this functionality back, I don´t know....
alt text http://img16.imageshack.us/img16/7299/vs2008snaptogrid.png
If you right click off to the right of your report and select properties you will find Draw grid and Snap to Grid

"in-line find" plug-in for Visual Studio

Is there a plug-in (or built-in feature) for Visual Studio 2008 to be able to do a quick in-line find in your code?
I am unhappy with the find feature (Ctrl+F). I don't like how it pops up in its own window. I think it would be much better if it was more like the Firefox find. (Try Ctrl+F in Firefox). I like how you start typing and it instantly tries to match what you're typing. Often you don't have to type your full search term before you find what you want.
I am use to FlashDevelop, and think they have good some great search functionality. you can just selected a word in your code and tap F3. It will instantly select the next occurrence of that string.
So is there anything out there with this sort of functionality?
Type Ctrl+I. This is the "inline find" version you want.
Ctrl+F3 will start a search for the word that the caret is in (without displaying the Find dialog). Subsequent presses of F3 will continue the search forward. Shift+Ctrl+F3 will search backwards. The whole word and case sensitive options of the Ctrl+F Find dialog are used during Ctrl+F3.
You already got your answer from 1800 INFORMATION, but I figured you might find this one interesting as well:
Favorite Visual Studio keyboard
shortcuts
A good amount of Visual Studio keyboard goodness.

Eclipse's Ctrl+click in Visual Studio?

After working for a few days with Eclipse Java I totally got addicted to pressing Ctrl and clicking on an identifier to go to its definition. Since then I've been looking for a way to achieve this in Visual Studio as well.
I realize VS has right click, Go to definition, and that F12 does the same. I also realize that Visual Assist does something similar with Alt + G. Yet none of these are as perfect as Ctrl + click.
I've actually tried my luck for a few hours trying to write a VS plugin to do it but didn't get anywhere in the time frame I thought reasonable for this.
Does anyone know how this could be achieved? A ready plugin? A macro of some kind?
If you use Visual Studio 2010, you can use the free
Visual Studio 2010 Productivity Power Tools from Microsoft to achieve this.
I use visual studio 2013 and 2015, I installed Go To Definition. To install this extension navigate on TOOLS -> Extensions and Updates.
I'll answer the commentors who asked about the difference between Ctrl-click and F12.
Ctrl-click workflow:
Move hand to mouse
Move mouse to hover over variable name
Other hand holds down Ctrl key while you click
Move mouse to position cursor, highlight, right-click, or whatever
Move hand back to keyboard to continue typing
F12 workflow
Move hand to mouse
Mouse mouse to hover over variable name
Move hand back to keyboard
Hit F12 key
Move hand back to mouse
Move mouse to position cursor, highlight, right-click, or whatever
Move hand back to keyboard to continue typing
If you assume the cursor is already positioned on the desired variable, F12 is better. However, that's rarely the case. Also, if you stop after this specific action, assuming you want hands back at the keyboard, the cost is the same. But if you keep in mind that you probably had a reason for wanting to go to the definition, the Ctrl-click workflow saves you an instance of moving between the keyboard and mouse.
Visual Assist supports Ctrl+Click as of June 2009 (build 1727). Activate Ctrl+LeftClick in VA Options | Advanced | General. (See the comment below.)
If you have Visual Studio 2010 you can use "Go To Definition" by Noah Richards.
http://visualstudiogallery.msdn.microsoft.com/en-us/4b286b9c-4dd5-416b-b143-e31d36dc622b
oh man, just install resharper!! (vs plugin) with it installed you just go and Ctrl + click to go to definition.
this is not the only thing resharper does, try it out free!!!
I use the built in options (F12, Right-click -> Go to definition) but I know a lot of the guys at my company use Resharper and it definitely has this functionality.
Microsoft released a Visual Studio 2010 extension named "Productivity Power Tools" which now adds Ctrl+Click functionality. So if you're like me, and hate installing third-party addons, you can now have the same functionality!
Another option with VS (besides F12 and right-click > Go to Def) is add the code definition pane (View > Code Def Window). This is essentially another editing pane that shows the code for the current symbol - no need to Ctrl-click or anything. I keep it pinned to my secondary monitor. Any time I need to see the implementation for a symbol I just click it and look over.
Another nice thing about F12 is you can also do ShiftF12 to find references to a symbol and F8 through them. The two go together like love and happiness.
I prefer to bind Go To Definition to CtrlD. This makes it extremely easy to use either with both hands on the keyboard (CtrlD to go tho the definition of the symbol under the cursor) or one hand on the keyboard and one hand on the mouse (Click on a symbol, then CtrlD).
All in all, both VS and Eclipse have weird key shortcuts.
I just had to respond, too: F12 is far too right on the keyboard and you have to leave the the mouse right hand for the keyboard to use it. As a long time VS user I just didn't find it until I searched for the Ctrl+Mouse equivalent in Eclipse. It's completely borked. OK? No need to argue. (The same goes for F3 in Eclipse going for definition. ???? Why the face??? It's FIND NEXT for Pete's sake. But this can be removed after mastering the Eclipse keyboard shortcut system in the course of a few years.)
Anyway, as has been said here before, Microsoft has already understood this can be an issue for new programmers coming in from Eclipse, so they provided the Power Tools (I followed the link up above).
http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef/
If you are using Visual Studio 2017, you can use Productivity Power Tools 2017
I don't work in VS much, so I haven't used it, but I've heard incredibly good things about Resharper from everyone I know who does. Everyone has told me it's worth every penny, and significantly improves efficiency in Visual Studio. I think it has a feature like what you're looking for, along with a TON of others.

Resources