Visual Studio - how do you use it without touching your mouse? - visual-studio

I am going to be doing the codekata defined on Roy Osherove's blog HERE.
One of the rules is that you cannot use the mouse while doing the kata.
Today, my first attempt at doing the kata I have spent the whole time trying to better understand how to use VS without the mouse. I have learned that CTL-ALT-A will be my friend because I can type commands there.
Does somebody have a pointer to a complete reference to the VS Commmands. I want the command name (Edit.ToggleBookmark), command keystroke (like Ctl-K,K), and any arguments required by the command.
Some specific questons I have.
Does someone know a keystroke for pinning the active window without using the mouse.
Also, I cannot figure out how to add a reference without using the keyboard.
If you can help with those two then I will be significantly farther along.
Thanks.
Seth
edit
Just figured out how to add references. I was working on a project that was not saved and Add References command (Project.AddReference) was returning an error...and I thought it was because I was using the command...but it was actually because I had not saved the project yet.
SO.... if you could help me with the window pinning that would be great.
Seth
EVEN WITH ALL THE HELPS FIGURING OUT COMMANDS...I still cannot figure out how to
- pin a Visual Studio window so it stays open.
- And how do you trigger the context menu any a window. For example, solution explorer?
- How do you delete or remove a file?
EDIT
This StackOverflow question answers the context menu question.
Now...if someone can tell me how to pin a window. That would be awesome.
Seth

Does somebody have a pointer to a complete reference to the VS Commmands. I want the command name (Edit.ToggleBookmark), command keystroke (like Ctl-K,K), and any arguments required by the command.
Because it's entirely user definable, I don't think any online reference for keystrokes will do you any good -- I personally have my own keyboard shortcut profile that works best for me.
Therefore, here's the best way to learn every command and its keyboard shortcuts:
Load Visual Studio
Go to the Tools -> Options menu.
Select "Keyboard" in the options list on the left.
Et Voila! Every possible command in VS and its keyboard shortcut (if it's assigned), along with the ability to assign your own. Oh, and search, too!

Kind of an old question here, but for ye olde Googlers/Bingers/SearchaMaTronickistas I thought it might be worth posting the link to the Keyboard Bindings Poster from Microsoft.

Related

Is there a key command to open suggestion menu (see image) in ReSharper

This has always bugged me and this morning I decided to try and find out if there is a key command to open the resharper suggestion menu and quickly up/down select the appropriate option. It's annoying to have to grab the mouse every time.
I checked the Resharper key commands list but couldn't spot anything that sounded like it would be it (although I found a few cool key commands I never knew about, particularly the encapsulate field command!)
Anyone know it if it exists?
Alt + Enter
This is unless you chose to keep the Visual Studio shortcuts instead of ReSharper ones.

Visual Studio: quick access to most used files

The solution I work on is quite big so it can require a lot of clicks to get to the desired file. I spend 90% of the time working with 8-10 files from this solution so it would be really convenient to have some kind of "Favorites" in my solution so I could jump to the most used files quickly. "Recent files" doesn't cut it, so maybe you know some extensions for VS2010 that do that? Google didn't provide any good options so I decided to give it a shot here and ask what do you use.
Thanks in advance
It's not quite what you asked for, but it'll help endlessly:
In vanilla VS2010, hit Ctrl-Comma (by default) for the "Navigate To" window. You can type a partial file, class or method name and it'll show you a list of where that appears in your solution, and you can open directly from there.
The DevExpress plugins also have a "Recently Used File" window (Ctrl-Shift-Period by default, I think) that does similar, but only shows files you've recently used (not classes or methods). I have to say, though, I've not used that since I've had VS2010.
Wow! A question since 2011 that is still valid to date.
From View Menu click Bookmark Window
open your favorite file
click any line - preferably the beginning of the file
from the Bookmarks Window, click the icon "Toggle a bookmark on the current line."
Very convenient!
Haven't tried this particular feature of the PowerTools myself, but it could do the trick:
http://blogs.msdn.com/b/visualstudio/archive/2010/08/03/quick-access-extension.aspx

Does intellisense work in XCode?

I am a noob to XCode, so forgive what could be a dumb question. It seems like XCode kind of does intellisense (or code completion). When I type in:
[self setT
it suggests the setTitle because its the first matching one. Is there a way to make it work a bit more like Visual Studio where you get a dropdown of available methods/properties/etc...?
You can press "Esc" for a list of suggestions.
You can also turn on automatic suggestions in the preferences.
Fn + Esc will bring up a list of them, and you may have to enable it in preferences
It's not always context sensitive (or gets confused about context easily)
But it still works

Is there a way to completely disable copy/paste functionality in Visual Studio?

I'm looking for a way to completely disable the copy/paste functionality in Visual Studio (2005 if it matters). The reason behind this request is that I want to prevent myself from doing too much copy/paste while coding.
Thanks to all for your answers!
No. Use self-discipline instead.
Yes, there is a way.
Download AutoHotKey. Save this as GoAwayN00b.ahk and double click it.
#ifWinActive, ahk_class wndclass_desked_gsk
^c::
^v:: MsgBox Go away n00b !
Additionally, you may want to provide visualisation for xtra stimulation. Save this picture and display it on hotkey press (left for exercise):
alt text http://images.paraorkut.com/img/funnypics/images/g/go_away_noob-12269.jpg
BTW, copy/paste + CLCL = FTW. I don't use VS without it.
EDIT:
Alternativelly, you can Customize Keyboard (right click toolbar -> Customize->Keyboard) and delete Edit.Copy and Edit.Paste hotkies.
However, above script works with any VS and on any computer while this solution needs to be setup individually.
The other day my daughter asked if I had a duller saw so she wouldn't cut herself as easily while pruning some bushes. Of course now it takes longer to prune the bushes...
As asked: The other day my daughter asked if I had a duller saw so she wouldn't cut herself as easily while pruning some bushes. Of course now it takes longer to prune the bushes... Refactored.
For dull saw she asked
No injury while pruning
Free time now all gone
I think you missed the point of the article but in you really want to, here are some resources for battle copypasta.
As Jeff lines out in his current blog entry, copy&paste itself is not the problem, but how you use it. As copy&paste can also be used to speed up "typing"/editing, you shouldn't disable it.
Prise your C button out of the keyboard.
Copy and paste is a valuable tool. You should be careful about what you copy and paste, but you don't need to disable it. Just watch what you're doing.
Don't forget to disable CTRL-drag as well!
Maybe you can find some sort of util that allows you to global remap key combinations. Then all you have to do is re-map the copy/paste combinations do to something else. Just an idea.
Although I think you are crazy for wanting to do it. :)
Write a small service program that will monitor clipboard changes and upon notification replace the clipboard text with "Content protection from lazy asses".

Why does my VB6 IDE loses its buttons and menu items?

I still have to use the VB6 IDE.
Unfortunately every time I start the IDE one of the buttons of the toolbar disappears. Almost always it's the Run button which goes first. Sometimes also items from the menu bar or the context menus are missing.
I have to reset the toolbars almost every time I start the IDE (Which is quite often during a typical work day). Recently I bought an IDE plugin which modifies the menu bar and requires a restart after every reset of the menu bar. (Otherwise it would crash)
I could live with just the resetting, but the restart is really annoying.
Is there something I can do?
To solve this problem:
Unload all add-ins.
Right-click on a toolbar and select the Customize... menu.
For each toolbar click the Reset... button (6 times in total).
Reload the add-ins.
For me action 3 was enough.
cf. MZTools faq (thanks to Andrea Bonafini), but these steps are originally from MSDN
It sounds like you recently bought a bad add-in. Can you get your money back? Every time I've had problems with disappearing controls in the IDE it has been due to a bad add-in. You can find out which one it is by disabling them, one by one, each time using the IDE for a while, then re-enable it and disable the next one, until the problem stops.
I still use one problematic add-in. It exhibits behavior similar to yours in that it makes the run button disappear. I avoid the problem by only loading the add-in when I need it, use it (it formats code), then I immediately unload it. If you don't use the functionality of the add-in that often, this could be an acceptable workaround.
Yea, i have this same problem with one of the add-in. But if you reset it. Shut the IDE down and open it back up again without doing anything, the IDE shouuld be able to retain the previous clean setup.
It's just guest, but:
Each graphical element on IDE (like button) is kind of resource (i.e. GDI handle).
Maybe your VB app doesn't manage these resources good enough and after sometime VB IDE cannot redraw elements like buttons (run is used often).
Also, maybe some IDE add-in is in conflict with some other add-in/application and breaks something -- I have this problem with Clip-X and MZ-Tools.
I had a similar problem when I was setting up the IDE to use for the first time, though it may not be helpful if you've been using the same IDE for a while. When I first started using the IDE, I would modify the toolbars and then close the IDE. When prompted if I wanted to save the open file I always said No, since the file was just a dummy file I was using to open the IDE with. Turns out the IDE was saving the toolbar preferences with that file, so they never got saved.
Try opening a file, customizing the UI, saving the file, then closing without modifying the code. This was the solution for me.
I've tracked down the problem and as suggested it was an add-in.
The problem went away as soon as I disabled the Visual Basic 6 Resource Editor.
How to restore your VB6 IDE without reinstalling:
Run Regedit
Find the entry for Visual Basic 6.0
Export your settings in case things
go wrong
Delete the 'UI' setting
Run VB and you will have your popup
menus back
The 'Find' button disappeared from my VB6 toolbar forcing me to select the Edit menu to use Find. I had two add-ins enabled: vbCodePrint and ResourceEditor; so I did away with both of them, turned VB6 off and back on, then put both add-ins back in and my button returned.
If you're still using the VB6 IDE, and I do amongst others, then this problem is not likely to have gone away. I use VB6 in Windows 10, and the problem is still there. But it doesn't affect me anymore.
I have had this problem a few years into using VB5 and VB6. Today, if I start VB6 directly, it may work fine the first time, but buttons will go missing the second time -- ALWAYS.
My solution, which I developed from day one:
Do whatever needs to be done to restore all your buttons. Save the Visual Basic 6.0 registry settings to a file, as suggested previously, and only keep the UI entry. Sometimes, you have to exit VB6 for it to post changes to the registry. So if this doesn't work the first time, try exiting before saving the settings.
I use my own program to launch VB6, which automatically copies my VB6 registry backup back into the registry -- by calling "RegEdit.exe /S D:\VB\IDE_Fix.reg" -- before I launch the IDE . This works every single time, and requires no action on my part.
If you read this, that means you are a programmer. You can make this work by yourself.
Mike
Reinstall,clean registry and update with SPacks etc....

Resources