Consider running your editor in screen (if it's installed on the remote machine). You can re-connect to screen after you log back in.
Failing that, you might try to trap signals which are sent to your shell by the server. I would imagine it will send SIGHUP or SIGTERM to the login shell when it wants to auto-disconnect you. If it sends SIGKILL, there's nothing you can do, but maybe not. You could try this, but bare in mind you may well get the sysadmin chasing you with a scimitar for doing this...
Alter your .bash_profile (or if you are using a different shell, whatever file is executed on login):
Code:
function nokillme () {
echo "ignoring signal - hahaha" > /dev/null
}
trap nokillme HUP INT TERM QUIT