The Ore Excavation mod makes for easy vein mining or tree excavation. It allows you to hold down a key (` by default) while using any tool greater than wood and it will destroy every block of that kind within a certain radius.
So if you come across a certain ore in a cave, just hold the grave (`) key while mining and all of that particular ore in the immediate radius will drop, leaving other blocks untouched. However, you can use it on any block in the game so be careful if you don’t want to destroy an area you didn’t mean to.
This also works great for taking down large trees with just one blow.
Everything can be configured with this mod in the in-game mod options. So you can set which tools will work with the mod, how big the radius is, and even blacklisting or whitelisting certain types of blocks.