How to align object pivot to selected points or edges? In the image on the left, I have selected two points and their pivot is positioned and rotated the way I need it

How can I make the object pivot align as well?
You can create custom orientation.


Select some vertices and your desired orientation (Normal in this case)  
Add it as a custom orientation through Transform Orientation menu > +
Your custom orientation will now apply to all objects (you can change it in the list)