Center your door in the rough opening when hanging a door. This does a couple things, it keeps the gap of the rough opening equal around the doors jamb. This is important and helps with installing the trim correctly. For instance in a hallway where the trim would look out of place if it were unequal on either side. In order for the trim to be equal and leave the correct gap between each wall, you must have the door centered in the opening and the centered between each wall.
Do this by making a center mark on the top of the opening, next make a small center mark on your door jamb. If you align these two lines and plumb the door from there, you should have a door that is centered in the hole and any adjacent walls.