add .gitignore and support for picking $EDITOR intelligently