Improvement to snippet mode's line numbering and highlighting