Author Topic: Comment reflow Request (again) and a question  (Read 2055 times)

b

  • Senior Community Member
  • Posts: 325
  • Hero Points: 26
Comment reflow Request (again) and a question
« on: October 24, 2017, 07:01:22 PM »
First, other than the automatic reflow of comments (which I've disabled as it usually doesn't do what I want--and doesn't do what I want), I have not successfully gotten manual reflow to work.

First, my request, one that I've made before, but I'll do it again.  In VIM, I can select multiple lines and then type the 'gqq' command sequence, and it will automatically reformat the selected lines based on the indentation of the first line and the linewidth settings (text, comment, whatever).   I have yet to figure out how to hook into the vi emulation processing of SE to write my own macro for the many times I absent mindedly execute that command stream and still would like to see that in the vim emulation.

Second, when I try to find the SE way of doing it, I can't seem to get *any* way to work.  Say I have the following.  Note I have where I want it to wrap (at 'maximum'):

See comment-before

I'd expect some result like:

comment-reflow1 or comment-reflow2

I've tried various different settings (entire block, current paragraph, selection with automatic width, fixed right margin, etc.) and nothing changes.

(via the reflow-dialog)

What am I missing.   I don't want every comment to automatically reflow, but I do want to be able to select lines of a comment block and be able to manually reflow just those lines.  (Again, in vim, this is automatically reformated and will properly place match the comment style, particularly if it needs to add lines).

---
SE v22.0.0.9 64-bit
Ubuntu 14.04
vim emulation
MingX on Windows 10
« Last Edit: October 24, 2017, 07:05:41 PM by b »

davehohl

  • Senior Community Member
  • Posts: 271
  • Hero Points: 27
Re: Comment reflow Request (again) and a question
« Reply #1 on: October 24, 2017, 07:38:12 PM »
I see the same behavior. I think the problem is because the feature only works on "block comments" (i.e., those using "/* ... */") and your example uses line comments ("//"). If you change to a block comment the feature seems to work.

b

  • Senior Community Member
  • Posts: 325
  • Hero Points: 26
Re: Comment reflow Request (again) and a question
« Reply #2 on: October 24, 2017, 08:04:25 PM »
Then, an additional request would be to get the reflow to work with line end comments as well.