[vim/vim] Recent changes to formatprg defaults are breaking gq for comments in rust (Issue #17055)

13 views
Skip to first unread message

Jeremy Cantrell

unread,
Apr 4, 2025, 10:42:02 PM4/4/25
to vim/vim, Subscribed

Steps to reproduce

Try to format a comment or documentation block using gq. Nothing is formatted. If I reset formatprg to the default, it formats fine.

Expected behaviour

Formatting a comment with gq should wrap long lines.

Version of Vim

9.1.1275

Environment

arch, foot terminal, TERM=foot, zsh

Logs and stack traces


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17055@github.com>

jmcantrelljmcantrell created an issue (vim/vim#17055)

Steps to reproduce

Try to format a comment or documentation block using gq. Nothing is formatted. If I reset formatprg to the default, it formats fine.

Expected behaviour

Formatting a comment with gq should wrap long lines.

Version of Vim

9.1.1275

Environment

arch, foot terminal, TERM=foot, zsh

Logs and stack traces


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17055@github.com>

Christian Brabandt

unread,
Apr 5, 2025, 3:10:03 AM4/5/25
to vim/vim, Subscribed

Does that mean rustfmt does not work with comment blocks?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17055/2780367949@github.com>

chrisbrachrisbra left a comment (vim/vim#17055)

Does that mean rustfmt does not work with comment blocks?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17055/2780367949@github.com>

Phạm Bình An

unread,
Apr 5, 2025, 8:48:51 AM4/5/25
to vim/vim, Subscribed

Try to format a comment or documentation block using gq. Nothing is formatted. If I reset formatprg to the default, it formats fine.

I think you should use gw instead? It is not affected by 'keywordprg'


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17055/2780704799@github.com>

brianhusterbrianhuster left a comment (vim/vim#17055)

Try to format a comment or documentation block using gq. Nothing is formatted. If I reset formatprg to the default, it formats fine.

I think you should use gw instead? It is not affected by 'keywordprg'


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17055/2780704799@github.com>

Enno

unread,
Apr 5, 2025, 10:59:48 AM4/5/25
to vim/vim, Subscribed

That was the idea.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17055/2780805712@github.com>

KonfektKonfekt left a comment (vim/vim#17055)

That was the idea.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17055/2780805712@github.com>

Enno

unread,
Apr 5, 2025, 11:01:33 AM4/5/25
to vim/vim, Subscribed

Likely rustfm misses context. That's what the RustFmt (modeled after :GoFmt) commands should supply, but neither does this work out in all cases.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17055/2780810453@github.com>

KonfektKonfekt left a comment (vim/vim#17055)

Likely rustfm misses context. That's what the RustFmt (modeled after :GoFmt) commands should supply, but neither does this work out in all cases.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17055/2780810453@github.com>

Jeremy Cantrell

unread,
Apr 5, 2025, 2:31:05 PM4/5/25
to vim/vim, Subscribed

I was not aware of gw and it does what I would expect.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17055/2781032500@github.com>

jmcantrelljmcantrell left a comment (vim/vim#17055)

I was not aware of gw and it does what I would expect.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/17055/2781032500@github.com>

Jeremy Cantrell

unread,
Apr 5, 2025, 2:31:05 PM4/5/25
to vim/vim, Subscribed

Closed #17055 as completed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/17055/issue_event/17141014226@github.com>

Reply all
Reply to author
Forward
0 new messages