I'm now setting up Vim for use with LaTeX. This is about setting up the indentation. In the picture below, there are many things that need tweaking. Everything between \vskip .5cm
and \vskip 1in
is just one hard line (as opposed to 3 soft-wrapped lines).
- I want the soft-wrapped lines to follow the original indentation, in this case, the indentation of
Once upon a time...
- At the right side of the screenshot,
computer
andcalled
are badly broken. If they don't fit the line width, they might as well move to the next (soft) line altogether. UPDATE: Now I have this fixed withset linebreak
.
Current settings
My pertinent settings in ~/.vim/ftplugin/tex_latexSuite.vim
are
set ts=4
set sw=4
set autoindent
set linebreak
Solutions I've tried
Upon reading :help autoindent
, I find that I can use gqgq
to format the current hard line, like so:
The single hard line now becomes 4 hard lines. However, that's not what I want. I believe that what I'm looking for is soft wrapping with proper indentation. Can I do that in Vim? How?
vim
have changed this.:(