For those sorts of things I think it's completely reasonable to drop into emacs, vim or sublime and then just copy paste back into your primary IDE.
When it's a text editing operation that you're trying to do (as opposed to a defined transformation on valid source) then it makes sense to use a text editor.
When it's a text editing operation that you're trying to do (as opposed to a defined transformation on valid source) then it makes sense to use a text editor.
I keep emacs and intellij open usually.