diff options
author | Damien George <damien.p.george@gmail.com> | 2015-08-20 10:34:16 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-09-12 22:07:23 +0100 |
commit | 0af73014cc61a05bcf53558d7c2d554d98da4419 (patch) | |
tree | b0c112db7129312ebd712d615c5c775fb58d208a /py | |
parent | 4e7bde8c9e43669be4403aa8076a65c865036626 (diff) | |
download | micropython-0af73014cc61a05bcf53558d7c2d554d98da4419.tar.gz micropython-0af73014cc61a05bcf53558d7c2d554d98da4419.zip |
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.
Diffstat (limited to 'py')
-rw-r--r-- | py/mpconfig.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index ce6fa6ceae..eb5b7243fe 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) |