Vim soft wrap with auto-intensive
In Vim, is there a way to softly wrap text, autoindent, but also give the appearance that soft wrapped lines are autoindividual?
eg. but not:
1 hello
2 one two three four five six seven eight nine
ten eleven twelve thirteen fourteen fifteen sixteen
seventeen
3 blah blah
I want it to look like this:
1 hello
2 one two three four five six seven eight nine
ten eleven twelve thirteen fourteen fifteen
sixteen seventeen
3 blah blah
But for a text file it should actually be the following:
1 hello
2 one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen
3 blah blah
So there are no actual tabs (or 4-space blocks) between nine
and ten
or between fifteen
and sixteen
- this is only part of how text is displayed in Vim, not the content of the file.
Some other text editors (like Geany) seem to do this automatically, but I can't seem to figure out how to do it in Vim.
source to share
You are not the first to ask about this feature. Unfortunately, there is no built-in way to achieve this effect with Vim.
But you can rebuild Vim with a patchbreakindent
and get what you want.
source to share