What's your favorite Shortcut?

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
User avatar
lithander
Greenskin
Posts: 125
Joined: Fri Nov 09, 2007 4:46 pm
Location: Bremen, Germany
x 3
Contact:

What's your favorite Shortcut?

Post 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.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Post by Klaim »

Alt-O in Visual Assist let you switch between foo.h to foo.cpp .

That is incredibly useful.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Post 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
Watch out for my OGRE related tweets here.
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Post 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.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
cdleonard
Goblin
Posts: 266
Joined: Thu May 31, 2007 9:45 am

Post 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).
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 538

Post 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.
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Post 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
User avatar
FrameFever
Platinum Sponsor
Platinum Sponsor
Posts: 414
Joined: Fri Apr 27, 2007 10:05 am

Post by FrameFever »

Strg+C- Copy
Strg+V and Paste
:D

ähh and
win+E run explorer
win+D show desktop
lilljohan
Halfling
Posts: 82
Joined: Tue Jan 03, 2006 4:05 pm
Location: Växjö, Sweden
Contact:

Post 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 :)
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post 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 :) )

---
User avatar
subquantum
Goblin
Posts: 270
Joined: Tue Oct 02, 2007 10:23 pm
Location: Rochester, NY
Contact:

Post 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 :)
User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
x 10
Contact:

Post 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. :lol: 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. :D

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. :roll:
Kerion
Goblin
Posts: 235
Joined: Wed Feb 05, 2003 5:49 am
Contact:

Post by Kerion »

ctrl k + d (format code) is my favorite short cut in Visual Studio. Great stuff.
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Post 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.
team-pantheon programmer
creators of Rastullahs Lockenpracht
lilljohan
Halfling
Posts: 82
Joined: Tue Jan 03, 2006 4:05 pm
Location: Växjö, Sweden
Contact:

Post 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.
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Post 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.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 538

Post 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.
lilljohan
Halfling
Posts: 82
Joined: Tue Jan 03, 2006 4:05 pm
Location: Växjö, Sweden
Contact:

Post by lilljohan »

Ehm, i was talking about the C# / VB.Net :D They have more formatting rules. And format document does not work in the c++ editor =/
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Post 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). :D
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
User avatar
lonewolff
Ogre Magi
Posts: 1207
Joined: Wed Dec 28, 2005 12:58 am
x 6

Post by lonewolff »

Control C, X, & V for sure!

I do alot of PC servcing, so;

Windows, Break (how ironic :lol: )

This shows OS, Service pack info, CPU type, RAM etc.
User avatar
chilligirl
Kobold
Posts: 31
Joined: Sun Apr 13, 2008 10:28 pm

Post by chilligirl »

Simple
<Windows> + E
or VS F7 and F5
The knack in flying lies in throwing your body at the ground and miss...
pratibha
Gnoblar
Posts: 3
Joined: Wed Aug 06, 2008 5:06 pm

How to SendMessage to 'Alt-O' in VC++

Post by pratibha »

hi,

pls let me know how to SendMessage to 'Alt-O' in VC++

thnks....[/quote]
Post Reply