On Wed, Sep 27, 2006 at 12:17:31PM -0400, Benji Fisher wrote:
>      Yes, I think that is the problem.  Note that ":help 'paragraphs'"
>      is *not* marked with "{not in Vi}".

I'm not alone at least :)

>      I think this is already mentioned in todo.txt:
> 
> -   Be able to redefine where a paragraph starts.  For "[[" where the
>     '{' is not in column 1.

Oh, great.

What I would like to see as an implementation is being able to define an
option which contain a list of regular expressions (actually it can of
course also be a single regular expression) denoting where a paragraph
start.

Actually the whole current meaning of 'paragraphs' can be defined on top
of a similar option, so I see no reason for keeping the current meaning
of 'paragraphs'. But of course I'm completely ignoring backward
compatibility issues here (not only with vi, but also with past vim
versions). I don't know if Bram cares about those issues or not ...

>      I have been meaning to do that, with some folding and so forth.
>      Do you have anything worth sharing in ftplugin/mail.vim , or do
>      you use anything that is already posted on vim.org ?

No brilliant solutions thus far, the better I was able to produce (and
that I actually use for both mail and TeX) is the attached plugin. It
maps <F3> to a function toggling auto-format (i.e. the presence of 'a'
in 'formatoptions'). I switch off auto-format when editing headers/TeX
macros and switch it on later.

Really sub-optimal, I know, better ideas are welcome :-)

Cheers.

-- 
Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy
[EMAIL PROTECTED],debian.org,bononia.it} -%- http://www.bononia.it/zack/
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. -!-
" toglles auto-formatting
function! ToggleAutoFormat()
  let saved_fo = &fo
  setlocal fo+=a
  if &fo == saved_fo
    setlocal fo-=a
    echo 'auto-format is now OFF'
  else
    echo 'auto-format is now ON'
  endif
  return ''
endfunction

inoremap <expr> <F3> ToggleAutoFormat()
nnoremap <expr> <F3> ToggleAutoFormat()

Reply via email to