This depends if you are a code first or visual layout first designer.
For code first you really need to use a separate editor such as Atom, Visual Studio Code, Brackets, Notepad++, phpStorm, webStorm or something else.
In Pinegrow click on the support --> settings menu item at the top of the application.
Uncheck Save backup files… I do this because PG causes a mess in my projects if I let it save backups.
Uncheck Auto-Format HTML code
Scroll down to the “sync” section and either disable or enable “Auto-reload files when changed outside of Pinegrow.” - This and the Auto-format html is the majority of the issues when editing html outside of pinegrow WHILE pinegrow is running with the same file also open.
Make sure any other settings are enabled or disabled to your preferance including anything like Emmet or CSS features that change the code inside of Pinegrow automatically.