A quick way to expand your current selection to include the next most significant element is to use the keystroke Alt-Shift-Up. Try placing your cursor in the middle of a word and hit Alt-Shift-Up. Your selection will expand to include the whole word. Say your word is a parameter in a method signature, hitting Alt-Shift-Up again [...]
Archive for the ‘editor’ Category
Line dancing
Posted in editor, tagged you can tell my arms go back into the farm on December 3, 2007 | Comments Off
I have never gone line dancing and there’s a good chance that I never will. I’m not trying to make a statement about urban cowboys. Just saying is all.
Eclipse has a way to make lines dance that Billy Ray Cyrus would be envious of. Alt-Up/Down cures your cut & paste blues and automatically indents the [...]
Content assist and templates
Posted in editor, tagged look ma no hands on November 29, 2007 | Comments Off
Let’s face it, we’d all like to do a little less typing and a little more sailing, wouldn’t we? Ctrl-space is the jack-of-all-trades keystroke that will have you typing less and hitting the water in no time. It goes by the intriguing name of “Content Assist” and I must admit that it’s a little hard to [...]
Ctrl-1 keystroke to rule them all
Posted in editor, tagged ctrl-1 ctrl-1 ctrl1... I just tripled my productivity on November 27, 2007 | Comments Off
Sometimes I wish that my IDE were smart enough to write my code for me by having a keystroke for “fix bug” or “imagine what customer wants and implement it… elegantly”. Eclipse can’t quite do that but it does have a wicked-cool keystroke in Ctrl-1, which depending on the context can suggest some pretty intelligent things.
For example, if [...]
Can anyone comment on this?
Posted in editor, tagged I bet even GPS is confusing in Ireland on November 23, 2007 | Comments Off
I’ve thought about this for some time and have come to the conclusion that commented out code is evil. Sometimes it’s left there because someone’s hinting at alternative solutions in an attempt to be helpful or as a piece of historical antiquity for future generations to puzzle over but most of the time it serves as [...]
Kills lines… dead
Posted in editor, tagged the usual pulp fiction wars on November 19, 2007 | Comments Off
I’ve become so accustomed to using this keystroke that I now constantly type it in applications that do not support it, then I become angry that they don’t. Anger leads to hate, hate leads to suffering and the next thing I know, I imagine reaching for a lightsaber (you know, the one that says “Bad Mother F***er”) to slice my [...]
Hey baby, what’s your line number?
Posted in editor, tagged pickup lines on November 16, 2007 | Comments Off
Got stacktrace? Jump to an arbitrary line in an editor with Ctrl-L. ‘Nuff said.
On a related note, I like to turn line numbers on in my editor (kinda makes me feel grounded). Go to Window > Preferences > General > Editors > Text Editors … phew… and click “Show line numbers”. Or don’t. Nobody’s got [...]
Mark ye all occurances
Posted in editor, tagged waldo has left the building on November 15, 2007 | Comments Off
Some classes and methods are long and sometimes searching for a variable in them feels like you’re reading a Where’s Waldo book, which apparently is less annoying than playing the Where’s Waldo game. Turn on “Mark Occurrances” and Eclipse will “mark” all “occurances” (get it?) of the currently highlighted symbol by highlighting them throughout the file and [...]