If you're using emacs on your local machine, you can get an sml-mode package from : ftp://ftp.research.bell-labs.com/dist/smlnj/contrib/ and get sml-mode-3.2.tar.Z or sml-mode-3.3b.tar.Z. This package has all the auto-indent stuff that lisp/C/C++ have, and it will also start the interpreter as a subprocess.