I think that is just practice. Start off changing between a couple of chords and then add more variations as you improve. It can be hard as the spacing changes up the neck. I don't have to think too much about it these days.
Is this with chords or single notes?