[分享] 可以嵌入micropython的Micropython-Editor

dcexpert   2019-4-14 11:12 楼主
可以运行在pyboard、ESP8266上的小型文本编辑器,完全用python编写。

  • 使用sys.stdin.read()和sys.stdout.write()来输入和输出Micropython版本。
  • 更改了读取键盘功能,以符合串行线路上逐字节的慢速输入。
  • 添加了对Tab,BackTab,Save,Del和Backspace,支持查找,替换,转到行,撤消,获取文件,自动缩进,设置标志,复制/删除和粘贴,缩进,取消缩进
  • 读取和写入文件时的处理Tab键(0x09),
  • 添加了状态行,提示退出,保存,查找,替换,转到,获取文件和标记设置。
  • 可选支持基本鼠标功能向上/向下滚动,设置光标和标记线。

假设用于VT100终端模式,下面是主要的按键功能:

Key(s)
Function
Up Down Left Right
Cursor movement by one line or char
Ctrl-Left Ctrl-Right
Move the cursor by one word left or right
Shift-Up Shift-Down
Mark the current line or extend the mark
PgUp & PgDd
Page up/down
Home
Toggle the position between the start-of-code and the start of line
End
Toggle the position between the end-of-the-code and end-of-line
Enter
Enter a line break at the cursor position. Auto-indent is supported
Backspace
Delete char left to the cursor (The key must be set to ASCII-Del)
Del
Delete the char under the cursor. At the end of the line join the next line. If autoindent is enabled, delete also the leading spaces of the joined line. If lines are marked, delete the marked area
Ctrl-Del
Delete to End-of-Line
Ctrl-O
Open a new file. If the file name is left empty, an empty buffer is opened
Ctrl-W
Toggle to the next file buffer
Ctrl-Q or Alt-Q
Close a file buffer or end line-edit
Ctrl-S
Save to file with the option to change the file name
Ctrl-W
Switch to the next file buffer
Ctrl-F
Find
Ctrl-N
Repeat last find
Ctrl-H or Ctrl-R
Find and Replace (opt)
Ctrl-G
Go to a line
Ctrl-T
Go to the first line (opt)
Ctrl-B
Go to the last line (opt)
Ctrl-K
Goto the bracket matching the one under the cursor (opt)
Ctrl-L or Ctrl-Space
Mark/Unmark the current line. The mark can then be extended by moving the cursor
Ctrl-X or Ctrl-Y
Cut the marked lines
Ctrl-C or Ctrl-D
Copy the marked lines
Ctrl-V
Insert the copied/cut lines. In the line edit mode paste the item under the cursor of the active window.
Ctrl-Z
Undo the last change(s)
Ctrl-P
Comment/Uncomment a line or marked area
Ctrl-A
Change settings for tab size, search case sensitivity, auto-indent, comment string and writing tabs (opt)
Ctrl-E
Redraw the screen. On WiPy and PyBord it shows the amount of free memory

软件网站





回复评论 (3)

谢谢分享!
服务器大全
点赞  2019-4-15 10:27
谢谢分享,这个看起来挺复杂的
点赞  2019-4-15 11:33
高端大气!
点赞  2019-4-16 15:37
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复