Let's speak of relative measures. My Vim looks like:
aaaaaaaaaaaaa
bbbbbbbbbbbbb
ccccccccccccc
etc
I would like it to be smaller:
aaaaa
aaaaa
bbbbb
bbbbb
ccccc
ccccc
etc
How can I get it? And how can I manage setting the length of such a block?
You can actually do two things:
Which do you want?
Option 1 would be achieved by setting textwidth
(for example :set textwidth=30
(from Swaarop's answer)). Then you can reformat your text by highlighting it (in visual mode) and typing gq
. (textwidth
can be abbreviated as tw
, thus :set tw=30
.)
Option 2 can be toggled by running :set wrap
/ :set nowrap
. This will wrap lines which are too long for the window.
Both are independent.