On Mar 16, 12:02 am, Erik Christiansen <[email protected]>
wrote:
> On Wed, Mar 16, 2011 at 01:12:03AM +1100, Ben Schmidt wrote:
>
> > Do you have n in your formatoptions to enable numbered list formatting?
>
> >    :set fo+=n
>
> > Doing the set command from my last post, plus the one just above, makes
> > it work for me.
>
> Doh, I haven't fiddled with formatoptions for many years.
> Adding 'n', and deleting '2', did the trick.
>
> I'll try to fly for a while without '2', but will have to change my
> habits for it to (potentially) work. If it doesn't, I suppose I could
> try modelines or au, to fudge my way to a working compromise.

Create two mappings to switch:

map <Leader>fon :set fo-=2 fo+=n<cr>
map <Leader>fo2 :set fo-=n fo+=2<cr>

Or one to toggle:

function! Foo()
  if &fo =~ "2"
    set fo-=2 fo+=n
  else
    set fo-=n fo+=2
  endif
endfun
map <Leader>foo :call Foo()<cr>

-Bill

-- 
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

Reply via email to