Format only selected region

Adding the ability for format only the selected region, if nothing is selected, it will format the entire buffer. If multiple regions are selection, it will format all of them.