@j3s Yet another reason to use Linux / Unixy OS though there is probably an analogalous but less convenient approach for Windows.

Also, another (preventative) approach is to write the whole thing in Vim first then copy it to the infuriating POS other editor :-)