Nifty Emacs package of the day: https://github.com/magnars/string-edit.el -- allows you to edit strings without worrying about escaping.