给 https://github.com/Glavin001/atom-beautify 增加了一个 pybeautifier 格式化器,通过 TCP server 来格式化代码,执行的时候不需要创建新进程,所以速度比原来的 autopep8 和 yapf 快很多。
PR 在这: https://github.com/Glavin001/atom-beautify/pull/1330 ,昨天刚合并,自己用了好几个月了
Server 代码在这: https://github.com/guyskk/pybeautifier
快速上手:
- 安装 atom-beautify ,并选择 pybeautifier 作为默认格式化器
pip3 install pybeautifier autopep8- 启动 Server:
pybeautifier或者pybeautifier -d(后台进程)