適切にフォーマットしたいコードのドキュメントがいくつかあります。
# book_id - integer
# chapter_id - integer (Optional)
# relative_url - Text: the url of the screencast file on S3, relative to the book's url
# view_count - integer
Tabular.vim をインストールしたところ、次のようになりました。
# book_id - integer
# chapter_id - integer (Optional)
# relative_url - Text: the url of the screencast file on S3, relative to the book's url
# view_count - integer
このようなコードを自動生成する方法が欲しいです。つまり、79 文字にラップされ、前のコメントから行が続く場合はインデントされます。私が得るものはこれです:
# book_id - integer
# chapter_id - integer (Optional)
# relative_url - Text: the url of the screencast file on S3, relative to the
# book's url
# view_count - integer
私が探しているのはこれです:
# book_id - integer
# chapter_id - integer (Optional)
# relative_url - Text: the url of the screencast file on S3, relative to the
# book's url
# view_count - integer
既存のプラグインまたはホットキー シーケンスでこれを行うことは可能ですか? gq
テキストをvimで設定された文字幅に再フォーマットするについて知っていますが、コメントなどにインデントを追加しません。