Lech Lorens wrote:

> On 30 June 2012 13:01, Bram Moolenaar <[email protected]> wrote:
> > Lech Lorens wrote:
> [...]
> >> I can't see any spaces I wouldn't expect; for me there are only single
> >> spaces at the joining points. Can you specify explicitly what would
> >> you expect to be converted into what?
> >
> > The example that Gary used:
> >
> > " This is the first line
> > " and this is the second line
> > " -  Now a list item
> > " -  A second list item
> >
> > Set 'filetype' to "vim" and add "j" to 'formatoptions.
> > Joining the last two lines leaves two spaces.
> > If you add more spaces before "A second list item" they will remain
> > after joining.  I don't think that should happen.
> 
> 
> But it doesn't work this way for me. The following file:
> #v+
> " This is the first line
> " and this is the second line
> " -       Now a list item.
> " -       A second list item
> "            and its continuation
> #v-
> 
> will be converted to this:
> 
> #v+
> " This is the first line
> " and this is the second line
> " -       Now a list item. A second list item and its continuation
> #v-
> 
> with this command:
> 
> vim -u NONE -U NONE -c 'setl com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"'    \
>                     -c 'set nojoinspaces'                           \
>                     -c 'setl fo=j'                                  \
>                     -c 'normal 3G'                                  \
>                     -c '.,$join'                                    \
>     test-fo-j.txt
> 
> It works the same way if I use the vim ftplugin. Perhaps you could
> show me what :set and :setl say for the file for which you see the
> problem?
> Or perhaps you see double spaces after a '.' and you have 'joinspaces' set?

Weird, now I can't reproduct it anymore.

-- 
>From "know your smileys":
 :-O>-o   Smiley American tourist (note big mouth and camera)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

Raspunde prin e-mail lui