Eclipse: Automatic line wrapping to specified width

前端 未结 3 1431
隐瞒了意图╮
隐瞒了意图╮ 2020-12-30 08:56

I\'d like for my lines, especially within comments, to be automatically managed so they don\'t get too long.

I remember once I had a configuration for vim

3条回答
  •  旧时难觅i
    2020-12-30 09:34

    In "Windows -> Preferences", go to "Java -> Code style -> Formatter" to customize the formatter (called when you click Ctrl+Shift+F). In the tab "comment", you can set the maximum line width for comments (it can be different then the line width for code).

    Tip: in the preferences, "Java -> Editor -> Save actions", you can make Eclipse to automatically format your file when you save it, so your code is always correctly indented !

提交回复
热议问题