Kana Natsuno wrote:

> On Thu, 21 Oct 2010 05:28:53 +0900, Kana Natsuno <[email protected]> 
> wrote:
> > After observation on 'foldopen' in 2 years, many users stumbled and
> > reported
> > the behavior about 'foldopen' and key mappings to vim_dev/vim_use.  I
> > believe
> > that it's not intuitive for most users.
> 
> I wrote a patch to improve the current behavior of 'foldopen'.  The
> patch introduces new item "map" for 'foldopen'.  If the value of
> 'foldopen' contains "map", moving the cursor into a closed fold opens
> the fold even if the movement is executed by a key mapping.

The problem with this is that it will break some mappings, without
giving the user a clue why this happens.

Suppose someone writes a complicated Vim script, that includes a mapping
that moves the cursor around, but does not want folds to change.  When
"map" is included in 'foldopen' this would be very difficult.
It would require the mapping to temporarily remove "map" from
'foldopen', do its thing, then restore 'foldopen to the previous value.

I don't like adding a new item unless it's a clear improvement, and in
this case it's debatable.

The problem "my mapping doesn't open folds" is a lot easier to recognize
and fix.

-- 
MORTICIAN:    Bring out your dead!
              [clang]
              Bring out your dead!
              [clang]
              Bring out your dead!
CUSTOMER:     Here's one -- nine pence.
DEAD PERSON:  I'm not dead!
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.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