Allow configuring indent size, etc. for autopep8
- 主要语言
- Vim Script
- 星标
- 1.1k
- 派生
- 102
- PR 合并指标
- 30 天内没有已合并 PR
描述
autopep8 allows configuring the indent-size and max-line-length to use as well as listing error codes to be ignored like `--ignore=E226,E302,E41`. It's currently possible to configure those via pep8 config files by putting something like the following in ~/.config/pep8 or a per-project setup.cfg or tox.ini:
``` cfg
[pep8]
indent-size = 2
max-line-length = 100
ignore = E226,E302,E41
```
Config files work pretty well in most cases, but it still would be nice to be able to configure via vimscript for some cases. I'm thinking there should be a flag and/or buffer-local variable that can be used to pass config to autopep8.
In particular, since vim already has settings that correspond to indent size and max line length, it would be great to have an option to hook those up to automatically match vim's 'shiftwidth' and 'textwidth' settings, since I've already configured formatting settings once and shouldn't be forced to repeat myself.
贡献指南
调研方向
从调用 autopep8 的 Vimscript 入口点开始,检查当前如何传递 formatter 选项。定义 flag 或 buffer-local 变量应如何映射到 autopep8 的 indent-size、max-line-length 和 ignore 设置,包括可选地使用 Vim 的 shiftwidth 和 textwidth;完成标准是无需在配置文件中重复这些设置即可对其进行配置。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python, vim
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100