Feeds:
Posts
Comments

Archive for the ‘editor’ Category

Expand and contract your selection

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 [...]

Read Full Post »

Line dancing

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 [...]

Read Full Post »

Content assist and templates

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 [...]

Read Full Post »

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 [...]

Read Full Post »

Can anyone comment on this?

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 [...]

Read Full Post »

Kills lines… dead

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 [...]

Read Full Post »

Hey baby, what’s your line number?

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 [...]

Read Full Post »

Mark ye all occurances

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 [...]

Read Full Post »