Lispy ---- lisp language editing helping package
按键
r: raise- 把 () 提升一级
c: convolute- 复制
上下移动
w: 上,s: 下,在键盘(w,s 按键)的下面
() 两边移动:
h,l: 左右移动d: 两边移动
() 遍历
- j,k: 上下多个 () 遍历
() 进入和退出:
Smartparens
kill sexp
smartparens:
sp-kill-sexp- 在 python-mode 中表现不如 kill-sexp
emacs:
kill-sexp- 识别 python 中的缩进对象, for 循环,字符串等
配对对象的跳转
smartparens
sp-forward-sexpsp-backward-sexpsp-down-sexpsp-up-sexp特点:
- 普通的
symbol和普通的单词也是处理的对象 - 配对的 "", (), [], wrap 对象也是跳转对象
- 普通的
emacs
Straight ---- another package manager
bugs
在 windows 上
straight 切换固定的 repo commit 有问题,需要手动处理
- git checkout …
- straight rebuild
- restart emacs
straight 安装的 package 加载问题
- 场景:直接 (1)load-path (2) require
- 问题:出现定义函数消失问题
举例:
- benchmark-init 包
- 加载 build 路径到 load-path
- require
- benchmark-init/activate, benchmark-init/show-durations-tree 等函数消失
Ripgrep ---- rg command
教程
FAQ
为什么 rust regex 比 python re 慢
DFA 和 NFA
使用 regex 语法
参考:
- rust regex 语法: regex - Rust
live-py-plugin ---- (live-py-mode in emacs)
emacs 中启动方法
M-x live-py-mode
python 代码触发 live-py-mode 执行
模块级直接执行
1 2 3 4 5 6def main(): a = 3 a += 1 print(a) main()通过 if … 语句, 注意
__live_coding__的拼写