Page 1 of 1
What's your favorite Shortcut?
Posted: Tue Jul 29, 2008 9:28 am
by lithander
The bigger our project grows the more I come attached to the various keyboard shortcuts that make my life so much easier. I'm curious about what keyboard shortcuts YOU find most helpfull when developing?
My number one favorite is
Ctrl+(Shift)+F in Visual Studio which allows you to search your project for a certain fragment of code or comment. I use that almost exclusively to navigate through the big piles of code i'm working with!
Close second is
Ctrl+Tab which cycles through the opened tabs. That's especially handy to jump back and forth between the header and the cpp.
Posted: Tue Jul 29, 2008 10:26 am
by Klaim
Alt-O in Visual Assist let you switch between foo.h to foo.cpp .
That is incredibly useful.
Posted: Tue Jul 29, 2008 10:47 am
by Assaf Raman
I use
DPack's numbered bookmarks:
Default keyboard shortcuts: Ctrl-Shift-0 - Ctrl-Shift-9 - set 0..9 bookmarks
Ctrl-Shift-Alt-0 - Ctrl-Shift-Alt-9 - set global 0..9 bookmarks
Ctrl-0 - Ctrl-9 - recall 0..9 bookmarks
Ctrl-Alt-0 - Ctrl-Alt-9 - recall global 0..9 bookmarks
Posted: Tue Jul 29, 2008 10:57 am
by haffax
I am at work right now and there I use eclipse with jdt. Hard to single a shortcut out. Most often used are probably: ctrl-1 for quick fixes/quick assists, these are time safers! I don't create fields in classes anymore, I just pretend they are already there and use them, then ctrl-1 and enter and eclipse creates the field for me with the proper type at the proper place enter again to accept and done. So fast. Same works with local and parameters and many many other recurring works.
Also useful ctrl-shift-r to open a resource, intelligent type-ahead find, which also accepts camel case word beginning, you can't get any faster to a place in your code.
All good things are three: alt-arrow_left/arrow_right, go to previous/next place in your project you where. Makes it easy to navigate between the places in your code you currently work with.
Once you get used to Eclipse/JDT Visual Studio feels just lame and uncomfortable with or without VA.
Posted: Tue Jul 29, 2008 12:09 pm
by cdleonard
Macro recording!
Ctrl-Shift-R <do some stuff> Ctrl-Shift-R Ctrl-Shift-P to repeat
For instance if you have 10 very similar lines you can record a macro that modifies one line and moves to the next. Then you Ctrl-Shift-P 9 times to modify all the other lines. This is frequently a lot faster than regular expressions because it requires very little thinking (unlike composing a regex).
Posted: Tue Jul 29, 2008 1:39 pm
by Kojack
Control-S, in pretty much everything.
I'm a paranoid save-aholic.
For programming, Control-Space for auto complete, F7 for build and Ctrl-F5 for run in plain Visual Studio.
Posted: Tue Jul 29, 2008 1:44 pm
by nullsquared
F9 - build and run
tab - tab selection
shift + tab - untab selection
ctrl + shift + c - comment selection
ctrl + shift + x - uncomment selection
ctrl + z - undo
ctrl + shift + z - redo
Posted: Tue Jul 29, 2008 2:09 pm
by FrameFever
Strg+C- Copy
Strg+V and Paste
ähh and
win+E run explorer
win+D show desktop
Posted: Tue Jul 29, 2008 2:44 pm
by lilljohan
In visual studio
Ctrl + k + d - Format document
Ctrl + k + m - Generate method stub
Ctrl + m + m - Toggle outlining
Ctrl + k + c - Comment selection
Ctrl + k + u - Uncomment selection
Ctrl + f - Quick find
F12 - Go to definition
And Ctrl + alt + a to start notepad, it's a custom one

Posted: Tue Jul 29, 2008 4:24 pm
by nikki
In a lot of things:-
Ctrl + S after almost every edit
---
In Visual C++ 2005:-
The usual copy paste stuff, ans
Ctrl + X without selecting any text (cuts line, I use it for deleting too)
Ctrl + K - Ctrl + C (comment selection)
Ctrl + K - Ctrl + U (uncomment selection)
F7 - Build
F5 - Run with debugging
Ctrl + right or left - Move by words (not really specific to this app, but I use it here the most)
Ctrl + Shift + right or left (select words, you can delete/change 'em then)
Home and End
And a lot of other things too
---
In Vim:-
Too many keys I use here.
---
Anywhere:-
Windows key + N - Brings up class templates (a .txt file I copy, shortcut
using AHK)
---
In Team Fortress 2:-
F10 (sleep

)
---
Posted: Tue Jul 29, 2008 4:38 pm
by subquantum
v<move>:s/oldthing/newthing/g
I'm a regex whore. Hell, I sometimes use this for editing
single lines when I don't want to invest the time into moving the cursor over twenty characters

Posted: Tue Jul 29, 2008 10:22 pm
by DanielSefton
In Visual Studio, probably Ctrl+H - because I'm ALWAYS replacing large chunks of code. Mainly because I'm fussy about naming everything perfectly.

Other than that, I'm an unproductive mouse man.
Control-S, in pretty much everything.
I'm a paranoid save-aholic.
I'm the opposite, in VS I also get paranoid about saving, but instead I click the 'three disk' icon (even with only one project open) about 5 times before I'm happy.
Blender is the program I use for shortcuts. I only use the mouse for navigating the 3D space - it has a keyboard shortcut for literally everything. And in that, I would say TAB, W and (used to be) F.

Posted: Tue Jul 29, 2008 10:30 pm
by Kerion
ctrl k + d (format code) is my favorite short cut in Visual Studio. Great stuff.
Posted: Tue Jul 29, 2008 10:47 pm
by haffax
Kerion wrote:ctrl k + d (format code) is my favorite short cut in Visual Studio. Great stuff.
Isn't it ctrl-k-f? At least in my vs2005 it is. If you are talking about vs2008, did they improve it there? All it does in vs2005 is fixing indention.
Posted: Wed Jul 30, 2008 9:51 am
by lilljohan
haffax wrote:Kerion wrote:ctrl k + d (format code) is my favorite short cut in Visual Studio. Great stuff.
Isn't it ctrl-k-f? At least in my vs2005 it is. If you are talking about vs2008, did they improve it there? All it does in vs2005 is fixing indention.
ctrl + k + f formats selection, so if you hav enothing selected then it just formats the current line. But they both fromat your selection / document according to to the rules you have set. And it work's great in vs2005 as well.
Posted: Wed Jul 30, 2008 1:28 pm
by haffax
ctrl + k + f formats selection, so if you hav enothing selected then it just formats the current line. But they both fromat your selection / document according to to the rules you have set. And it work's great in vs2005 as well.
Sorry for putting this slightly offtopic, but I feel dense now. Where do I set the formatting rules?
The only place I kow about is options -> text editor -> C/C++ and there are only indention rules like how many spaces/tabs, tab width and such, but nothing like put X whitespaces between if and ( or whether to put curly bracess on the same or on the next line and such formatting rules.
Posted: Wed Jul 30, 2008 1:53 pm
by Kojack
Hmm, when I try Control-K-D it tells me that format document is not currently available.
???
Control-A Control-K-F works fine though.
Posted: Thu Jul 31, 2008 12:12 pm
by lilljohan
Ehm, i was talking about the C# / VB.Net

They have more formatting rules. And format document does not work in the c++ editor =/
Posted: Thu Jul 31, 2008 12:16 pm
by syedhs
Ctrl K+D really reminds me of WordStar (save document), among others Ctrl K+X (save document and exit to DOS), Ctrl K+Y (cant remember what is this for).

Posted: Thu Jul 31, 2008 12:39 pm
by lonewolff
Control C, X, & V for sure!
I do alot of PC servcing, so;
Windows, Break (how ironic

)
This shows OS, Service pack info, CPU type, RAM etc.
Posted: Wed Aug 06, 2008 3:17 pm
by chilligirl
Simple
<Windows> + E
or VS F7 and F5
How to SendMessage to 'Alt-O' in VC++
Posted: Wed Aug 06, 2008 5:26 pm
by pratibha
hi,
pls let me know how to SendMessage to 'Alt-O' in VC++
thnks....[/quote]