tpope / vim-repeat

repeat.vim: enable repeating supported plugin maps with "."
http://www.vim.org/scripts/script.php?script_id=2136
2.59k stars 81 forks source link

Remapping u/U interferes with foldopen #9

Closed y closed 12 years ago

y commented 12 years ago

Because the repeat plugin remaps the 'u' command, foldopen no longer opens the fold when an undo happens in a closed fold. According to the help for foldopen:

When the command is part of a mapping this option is not used. Add the zv command to the mapping to get the same effect.

So repeat should check if 'undo' is listed in 'foldopen' and if so, add the 'zv' command to the 'u' remapping.

tpope commented 12 years ago

Simple enough. Can you confirm if the same behavior should apply to U and <C-R>?

y commented 12 years ago

Yes, U and should also reopen folds.

tpope commented 12 years ago

Good deal. Thanks for the tip.

On Sat, Aug 18, 2012 at 11:51 AM, y notifications@github.com wrote:

Yes, U and should also reopen folds.

— Reply to this email directly or view it on GitHubhttps://github.com/tpope/vim-repeat/issues/9#issuecomment-7845590.