mjs*_*mjs 10 php eclipse comments eclipse-pdt reformat
在Eclipse PDT,Ctrl-Shift-F重新格式化代码.但是,它根本不会修改注释.有没有办法将不规则的多行注释重新格式化为每行80个字符(或其他)?
即转换
// We took a breezy excursion and
// gathered Jonquils from the river slopes. Sweet Marjoram grew
// in luxuriant
// profusion by the window that overlooked the Aztec city.
Run Code Online (Sandbox Code Playgroud)
至
// We took a breezy excursion and gathered Jonquils
// from the river slopes. Sweet Marjoram grew in
// luxuriant profusion by the window that overlooked
// the Aztec city.
Run Code Online (Sandbox Code Playgroud)
(我认为这也适用于常规Eclipse.)
更新原来Eclipse在Java模式下将重新格式化上面的行,但前提是它们是/**/ - 样式的注释.它会缩短//太长的行,但它不会连接太短的行.
您可能需要配置 Java 格式化程序以包含注释。
首选项 -> Java -> 代码样式 -> 格式化程序 -> 编辑... -> 注释
确保“启用 XXX 评论格式”已启用。
| 归档时间: |
|
| 查看次数: |
5773 次 |
| 最近记录: |