A very small text editor written in C that does not use much memory. This is a built-in MicroPython module.
- Up to 64KiB
- No horizontal scrolling
- No Japanese (ASCII characters only)
- Up/down, left/right cursor movement
- Page movement
- BS, DEL delete
- SPIFFS support
- LF for line endings
$ git clone --recursive https://github.com/micropython/micropython.git
$ git clone https://github.com/EiichiroIto/modeditor.git
$ cd micropython/ports/unix/
$ make USER_C_MODULES=../../../modeditor/
$ build-standard/micropython
$ cd micropython/ports/rp2/
$ make USER_C_MODULES=../../../modeditor/micropython.cmake
$ cp build-PICO/firmware.uf2 $(WHERE_PICO_MOUNTED)
>>> import editor
>>> editor.edit("main.py")
Ctrl-X Ctrl-S
Ctrl-X Ctrl-C
set buffer size to 4096 bytes. (defaults are 1024 bytes)
>>> dir(editor)
['__class__', '__name__', '__dict__', 'edit', 'set_buffer_size', 'set_screen', 'set_tab_width']
>>> editor.set_buffer_size(4096)
set screen size to 80 cols by 24 rows. (defaults are 40 cols by 24 rows)
>>> editor.set_screen(80, 24)
set tab width to 8 characters. (defaults are 4)
>>> editor.set_tab_width(8)