I've been using Vim for a week now. And I've noticed something.
I have textwidth unset, and I have wrap set. Now, my question is. Currently whenever I line longer than 120 characters (window width), it takes the last character, and just like that, wraps it. So if it's in the middle of a word it looks like this:
This is a very long sen|
tence, this looks very |
strange, don't you thin|
k? |
BTW, the |
represents the text limit, very short in this case, to prove my point. So that says what my problem is, I would like a simply solution to this, as long as I don't lose any screen real estate.
Of course, the ideal solution would output the following, without modifying the text, only the output, the text remains in one line, but it appears to be spread over several:
This is a very long |
sentence, this looks |
very strange, don't you|
think? |
Thanks for any help you can provide. :)
Extra info:
I've tried the following:
set textwidth=120
set wrap
set linebreak
set fo=1
Command to toggle word wrap in Vim While :set wrap will turn on word wrap in Vim and :set nowrap will turn off word wrapping, you can also use both commands with the ! (bang) symbol to toggle word wrap.
If you want to wrap lines in a specific area, move the cursor to the text you want to format and type gq followed by the range. For example, gqq wraps the current line and gqip wraps the current paragraph.
A soft return or soft wrap is the break resulting from line wrap or word wrap (whether automatic or manual), whereas a hard return or hard wrap is an intentional break, creating a new paragraph. With a hard return, paragraph-break formatting can (and should) be applied (either indenting or vertical whitespace).
set linebreak
is enough. It doesn't work when list
is on, though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With