diff --git a/esp8266/mpconfigport.h b/esp8266/mpconfigport.h
index 55d781c46b581323b6b4e932504ba4d7e813db87..cedc6dd405d187f19e09393c886d6a35509b4937 100644
--- a/esp8266/mpconfigport.h
+++ b/esp8266/mpconfigport.h
@@ -12,6 +12,7 @@
 #define MICROPY_ENABLE_GC           (1)
 #define MICROPY_STACK_CHECK         (1)
 #define MICROPY_REPL_EVENT_DRIVEN   (1)
+#define MICROPY_REPL_AUTO_INDENT    (1)
 #define MICROPY_HELPER_REPL         (1)
 #define MICROPY_HELPER_LEXER_UNIX   (0)
 #define MICROPY_ENABLE_SOURCE_LINE  (1)