Author Topic: fill-paragraph equivalent in SE  (Read 153 times)

asandler

  • Senior Community Member
  • Posts: 255
  • Hero Points: 22
fill-paragraph equivalent in SE
« on: July 14, 2017, 12:44:45 pm »
Emacs has command called fill-paragraph. It basically restructures current paragraph to fit into certain width. It is a bit smarter than simple line wrap because it understands various languages, e.g. Javadoc. So when calling fill-paragraph on something like:
Code: [Select]
/********************
 * Long text here
 *******************/
It will correctly restructure it as:
Code: [Select]
/********************
 * Long
 * text
 * here
 *******************/
I am wondering if SE has something similar. Comment wrap seems to be close to what I am looking for, but comment wrap changes text as I type. What I need is something that does it once, on demand.

Thanks

asandler

  • Senior Community Member
  • Posts: 255
  • Hero Points: 22
Re: fill-paragraph equivalent in SE
« Reply #1 on: July 14, 2017, 02:50:29 pm »
I found "reflow-comment" command. At least judging by the name, it does something like I want, but for reasons I don't understand it doesn't do anything. Any ideas?

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2152
  • Hero Points: 273
Re: fill-paragraph equivalent in SE
« Reply #2 on: July 18, 2017, 02:35:34 pm »
Have you checked the comment wrap settings?  Document > C/C++ Options... > Comment Wrap.

reflow_comment uses those settings.  gui_reflow_comment will prompt you and let you reflow a comment with other specific settings.