google / google/vim-codefmt

Allow configuring indent size, etc. for autopep8

オープン
#24 コメント 13 件 リアクション 3 件 担当者 0 名 GitHub で見る
enhancement
主要言語
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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。