Thanks. I'm surprised there's no better way. I can't get used to watching my spaces at the end of equation lines, so I think I'll go for formatoptions=tcqw and then make a binding to gwap that I can hit occasionally.
On Aug 19, 7:11 am, "A. S. Budden" <abud...@gmail.com> wrote: > 2009/8/19 at <atorgovit...@gmail.com>: > > > > > > > My .tex files typically look like... > > > ------------------------------ > > This is some text that I'm writing in a paragraph, > > blah blah blah, etc. etc. > > > \begin{equation} > > a = b + c > > \end{equation} > > ------------------------------- > > > I currently have formatoptions = tcqwa. This works great for the text > > paragraph (the first part). But it has some really annoying effects > > for the second part, for example if I leave a space after "c" and then > > leave insert mode, it will reorganize \end{equation} to be on the same > > line as "a = b + c". > > > As far as I can tell there are no set of format options that will give > > me the behavior I want in both sections. So my question is, is there a > > way I can define what a paragraph is so that I can only have my format > > options apply to the first part and not the second? Thanks! > > I don't believe that this is possible, although in this specific case, > you could do a substitution to ensure that \end{equation} is always at > the start of the line. > > The way that always worked for me when I was writing latex documents > was to avoid leaving spaces on the end of equation lines. Having said > that, I used formatoptions=tcqw, so it only reformatted the lines I > was typing: other formatting was done with gq. > > Sorry that this isn't really the answer you're looking for. I guess > the alternative would be to use :set wrap, but I never got on with > that. > > Al --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---