Allow configuring indent size, etc. for autopep8
- Ngôn ngữ chính
- Vim Script
- Star
- 1.1k
- Fork
- 102
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu từ điểm vào Vimscript gọi autopep8 và xem xét cách các tùy chọn của formatter hiện được truyền vào. Xác định cách một flag hoặc biến cục bộ theo buffer sẽ ánh xạ tới các thiết lập indent-size, max-line-length và ignore của autopep8, bao gồm cả việc tùy chọn sử dụng shiftwidth và textwidth của Vim; hoàn thành có nghĩa là các thiết lập này có thể được cấu hình mà không cần lặp lại chúng trong tệp cấu hình.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python, vim
- Lĩnh vực
- tooling
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100