> I'm using vim 7.2.402 on Win XP. I have following text with
> set tw=72
> --------------------
> <p><a href="intro.html">aaaaaaa aaa aa aaa aaaa, aa aaaaa
> bbbbbbbbb - bb bbbbbbbbbbb bb bb bbbbbbbbbbbbbbbbbbbb - bb
> cccc ccccccccc ccccccccccccccccccccc cc ccc cccccc ccc ccccccc
> dddddddd dd dddd dddddddd d ddddddddddd. dd ddddd, dd ddddd
> ee ee eeeeeeeeeee eee eeeeeeeeee e ee eeee eee eeeeeee eeee
> ff fffff fff ffff, ff fffff ff ffffffffff ... ffffffff
> ggggggg ggggggg</a>
> --------------------
>
> If I visually select the text and do gw or gq, and
> set ft=xhtml or html I get:
> --------------------
> <p><a href="intro.html">aaaaaaa aaa aa aaa aaaa, aa aaaaa bbbbbbbbb -
> bb bbbbbbbbbbb bb bb bbbbbbbbbbbbbbbbbbbb - bb cccc ccccccccc
> ccccccccccccccccccccc cc ccc cccccc ccc ccccccc dddddddd dd dddd
> dddddddd d ddddddddddd. dd ddddd, dd ddddd ee ee eeeeeeeeeee eee
> eeeeeeeeee e ee eeee eee eeeeeee eeee
> ff fffff fff ffff, ff fffff ff ffffffffff ... ffffffff ggggggg
> ggggggg</a>
> --------------------
>
> Notice that the antepenultimate line isn't formatted correctly.
> That doesn't happen if I set ft=text or leave it empty.
> Many thanks in advance.
>
Reproduced on Windows XP with 7.2.394, "Cream" build. That is strange.
It also happens if you close the <p> tag and use gqat on it. It does
NOT happen if you join it all on one line and use gqq, or visually
select just the text on lines that do not include an opening/closing
tag. It DOES happen if the operation of the gq command covers one or
both of the opening/closing tags, for example with the cursor on the
first line, doing gq5j.
I do not know what could be causing this, there is no formatexpr or
formatprg set for this filetype in my setup.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
No comments:
Post a Comment