Erik,
Standard Arduino IDE has an option for "Using external editor"
In this mode, you can't modify the sources directly via Arduino IDE. Textbox field becomes greyed out and doesn't update in real time. When you upload compile / upload button, it refreshes the source files from the harddisk and does its magic.
Way much better way to "copying and pasting"

Edit in the external editor, hit compile / upload button in the Arduino IDE.
Best,
ihsan.