On 2016-04-23, Glenn Golden wrote: > The following is likely just user braindamage on my part, but after hours > of fiddling with it and reading up on indenting options, I still can't figure > out what's going on. > > The following indented paragraph, call it Paragraph A, gets reformatted > as expected using 'gqap': > > Axx xxxxx xxx xxxxxxx xxxxxxxxx Xxxxxxxxxxxxx xxxxxxxxxxxxxx xxx xxxxx > foo xxxxxx xxxxxxxx. Xxxxxxx xxxxxxxxxxx xx > xxxxxxxx xxxxxxx xxxxxxxxxx xxx xxxx xxx xxxxxxxx. > > Here is the result: > > Axx xxxxx xxx xxxxxxx xxxxxxxxx Xxxxxxxxxxxxx xxxxxxxxxxxxxx xxx xxxxx > foo xxxxxx xxxxxxxx. Xxxxxxx xxxxxxxxxxx xx xxxxxxxx xxxxxxx xxxxxxxxxx > xxx xxxx xxx xxxxxxxx. > > (The above behavior is what I expect.) > > But this paragraph, Paragraph B, doesn't get formatted as expected using > 'gqap': The last line winds up with an extra level of indentation. > > Bxx xxxxx xxx xxxxxxx xxxxxxxxx Xxxxxxxxxxxxx xxxxxxxxxxxxxx xxx xxxxx > for xxxxxx xxxxxxxx. Xxxxxxx xxxxxxxxxxx xx > xxxxxxxx xxxxxxx xxxxxxxxxx xxx xxxx xxx xxxxxxxx. > > Here is the result: > > Bxx xxxxx xxx xxxxxxx xxxxxxxxx Xxxxxxxxxxxxx xxxxxxxxxxxxxx xxx xxxxx > for xxxxxx xxxxxxxx. Xxxxxxx xxxxxxxxxxx xx xxxxxxxx xxxxxxx xxxxxxxxxx > xxx xxxx xxx xxxxxxxx. > > The only difference between paragraphs A and B is that the word 'foo' in A > is changed to 'for' in B. So possibly that 'for' is being interpreted as > a C (or other language) keyword that is fooling the indentation algo somehow? > But, afaict, C indentation is disabled (see below). > > To demo this problem: > > 1. Set options as indicated in attached bugreport.txt. > 2. Place cursor on "Axx" in Paragraph A. > 3. Do 'gqap'. Observe result is as shown above. > 4. Place cursor on "Bxx" in Paragraph B. > 5. Do 'gqap'. Observe result is as shown above. > > > Here are the vim option settings used for the above demo that seemed to > me to be relevant to this issue: > > nocindent > formatexpr= > formatprg= > formatoptions=tcqn
You appear to have 'smartindent' set. Regards, Gary -- -- You received this message from the "vim_dev" 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
