From 0af73014cc61a05bcf53558d7c2d554d98da4419 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 20 Aug 2015 10:34:16 +0100 Subject: lib/mp-readline: Add auto-indent support. 4 spaces are added at start of line to match previous indent, and if previous line ended in colon. Backspace deletes 4 space if only spaces begin a line. Configurable via MICROPY_REPL_AUTO_INDENT. Disabled by default. --- py/mpconfig.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'py') diff --git a/py/mpconfig.h b/py/mpconfig.h index ce6fa6cea..eb5b7243f 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -302,6 +302,11 @@ #define MICROPY_REPL_EMACS_KEYS (0) #endif +// Whether to implement auto-indent in REPL +#ifndef MICROPY_REPL_AUTO_INDENT +#define MICROPY_REPL_AUTO_INDENT (0) +#endif + // Whether port requires event-driven REPL functions #ifndef MICROPY_REPL_EVENT_DRIVEN #define MICROPY_REPL_EVENT_DRIVEN (0) -- cgit v1.2.3