points
Any editor written or actively maintained in the current century does this automatically for you. (Yes that obviously includes Emacs and Vim).