Add automatic line numbering toggling