Smartparens

kill sexp

  • smartparens: sp-kill-sexp

    • 在 python-mode 中表现不如 kill-sexp
  • emacs: kill-sexp

    • 识别 python 中的缩进对象, for 循环,字符串等

配对对象的跳转

  • smartparens

    • sp-forward-sexp
    • sp-backward-sexp
    • sp-down-sexp
    • sp-up-sexp
    • 特点:

      1. 普通的 symbol普通的单词 也是处理的对象
      2. 配对的 "", (), [], wrap 对象也是跳转对象
  • emacs

Straight ---- another package manager

bugs

在 windows 上

straight 切换固定的 repo commit 有问题,需要手动处理

  1. git checkout …
  2. straight rebuild
  3. restart emacs

straight 安装的 package 加载问题

  • 场景:直接 (1)load-path (2) require
  • 问题:出现定义函数消失问题
  • 举例:

    1. benchmark-init 包
    2. 加载 build 路径到 load-path
    3. require
    4. benchmark-init/activate, benchmark-init/show-durations-tree 等函数消失

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 x
  • C-x C-s –> x s
  • C-g –> <esc>
  • C-x b –> x SPC b
  • C-u M-x my-command –> u g x my-command

重复 M-x repeat

查询 key

god-mode-describe-key