When I am editing a LaTeX file using Vim-LaTeX
and want to reformat a section of text that is in a \caption{}
I get overhangs or underhangs - I am not sure what to call them. I first select the text in the caption then use "gq" to reformat it. After reformatting the caption looks like:
\caption{The problem is that when I reformat the text
in a caption the text on each successive line
begins further and further to the left until it begins
at the first space of the line.}
what I would hope the result would look like would be something like:
\caption{The problem is that when I reformat the text
in a caption the text on each successive line
begins further and further to the left until it
begins at the first space of the line.}
I hope the formatting in this post remains true to what I typed in, but I tried to describe the problem in the first example caption. The second should be left justified.
Does anyone know what I need to do to fix this? I am assuming that there is a setting that I need to change, but I have not been able to figure out what it is.
The gq
command formats based on 'formatexpr'
or 'formatprg'
. You can start by checking the values of these options with :se fex?
and :se fp?
.
From looking through the vim-latex
plugin it never sets these options, so this is likely set by your other plugins or vimrc. You can find out exactly where an option is set by using :verbose
.
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