Hi,

Erik Christiansen wrote:
> Reply-To: dva...@internode.on.net
> In-Reply-To: 
> <8fc5808f-0fa2-4ad8-bc01-b614c2943...@17g2000prr.googlegroups.com>
> 
> On Wed, Mar 16, 2011 at 10:39:43AM -0700, Bee wrote:
>> On Mar 16, 12:02 am, Erik Christiansen <dva...@internode.on.net>
>> wrote:
>>>
>>> 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>
> 
> Oooooh! Thank you very much for those. :-)
> 
> While simple mappings normally appeal most, I have F12 as pastetoggle,
> and another handy toggle on F11 could be learnt by association.
> 
> After using fo-=2 fo+=n for a day or two, I now have to try to find out
> what is causing frequent weirdness when formatting a simple paragraph,
> devoid of any digits, and therefore incapable of triggering the current
> formatlistpat, IIUC. With:
> 
> formatoptions=croqltn
> formatlistpat=^\s*\(\d\|\a\)\+\.\s*
> autoindent
> textwidth=72
> 
> Vim now mishandles a gq} performed on:
> 
> »
> I couldn't see anything but screw heads when hovering over the last two
> photos. (But then I'm arguably GUI dyslexic, possibly due to decades pushing
> characters.)
> «
> 
> giving this oddly skewed result:
> 
> »
> I couldn't see anything but screw heads when hovering over the last two 
> photos. (But then I'm arguably GUI dyslexic, possibly due to decades 
>         pushing
> characters.)
> «

the way you have set formatlistpat "photos." is interpreted as the
start of an item in a list. You get better results with

  :set formatlistpat=^\\s*\\(\\d\\+\\\|\\a\\)\\.\\s*

Note that I have moved the \+ quantifier to immediately behind \d so
that only one or more digits and exactly one letter are allowed as
"numbers".

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

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