I wrote a better duplicate line command for Sublime Text 2 to behave the way it should. Ok, maybe it's just preference, but I think you'll find it very useful.
It behaves more like Eclipse. You can have your cursor anywhere in a line and duplicate the full line. This also works with multiple lines. Again, the nice thing here is that it doesnt' care where your curor is. You can lazily highlight a group of lines, use the shortcut, and you'll get an idential duplicate of the lines.
Here's a quick example. I've selected some lines below, but I was lazy about it. Meaning I didn't select the hard beginning of the first line, or the hard end of the last line.
When I run my command, I get a perfect duplicate:
And it keeps the selection like you would expect, so you can duplicate to your heart's content.
Upvote if this is helpful for you and then go check out the readme on github. I encourage you to try it out. You won't go back.
Check out some of my other tips and follow me here: @wjonthomas