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__的拼写
god-mode ---- a key seqence tool
按键替换
- Ctrl –> 空值
- Meta –> g
- C-M –> G
M-num –> num
- eg: (M-1, 1), (M-5, 5)
M-12–>1 2
非 meta 或 ctrl 开头的按键
C-x s–>x SPC s
常用按键
M-x–>g xC-x C-s–>x sC-g–><esc>C-x b–>x SPC bC-u M-x my-command–>u g x my-command