word wrap - vim command to restructure/force text to 80 columns -
I know that automatically set textwidth
(such as) What I see is similar to some =
(indent line command), but to wrap 80 In the case of usage sometimes you edit the text with text width and after wrapping in lines or wrapping / removing the text wrapped in a bad way.
Ideally, this command will completely reconstruct the selected lines and cut the long lines while adding the little ones. An example:
After running the command (assuming the rap as 13 columns):
The long line is long! Less
If this is not true with the vim command, maybe there is a command line program that does it that I can pipe the input?
After searching, I found in this context that there are a few other options:
For Set textwidth
80, the file can be started with the beginning ( Ctrl - Home or gg
), And type gqg
.
gqg
formats the file starting with the current state and by the end of the file. It will automatically be included in consecutive lines when possible. You can place a blank line between the two rows if you do not want to include them together at all.
Comments
Post a Comment