set term correctly
set up persistent undo