In Eclipse, I can format comments by selecting them and pressing Shift + Ctrl + F
. For example, when I select a method comment like this:
/**
*
The JetBrains plugin Wrap to Column is made for this:
From the overview:
Wraps text to the specified column width. Similar to the Emacs command 'Fill Paragraph' and Vim's
gq
(format lines) command. This is a replacement for the native Intellij Fill Paragraph command, which doesn't work quite how I need it to.This plugin provies two IDE actions:
- Wrap Line to Column: Wraps selected text or the current line if no text is selected. This is useful for IdeaVim users who wish to pair the command with motions like
vip
(select current paragraph).- Wrap Paragraph to Column: Wraps the paragraph (multiple lines) in which the cursor appears. No selection is needed, and will be ignored.