big improvements to autoedit including:
- fix for #863
- autoinsertion of extra newline before closing brace