FastFold icon indicating copy to clipboard operation
FastFold copied to clipboard

Operator-pending mode for text objects in Readme

Open seb-mueller opened this issue 4 years ago • 3 comments

Text object definition should be using Operator-pending mode (omap) rather than xmap. Also prefixed Update seems to break motions (e.g. diz or >iz didn't work, but does after removing prefix as in this PR)

seb-mueller avatar Aug 23 '21 21:08 seb-mueller

Thank you for the suggestion and agreed that the operator-pending mappings are missing. Their definition given here should update the folds first, like the visual-mode mappings. It is missing as my naive tries did not succeed.

Konfekt avatar Aug 24 '21 07:08 Konfekt

Indeed, I've tried it including the update fold first (prefixing :<c-u>FastFoldUpdate<cr><esc>), but it didn't work for some reason. Excluding it does work as in the PR (have you tried it?), maybe this is not optimal, but could good enough to include it. At the least the heading should be changed since xmap doesn't really Create a fold text object (omap does though).

seb-mueller avatar Aug 24 '21 08:08 seb-mueller

Okay, these operator-maps can be readded (on top of the visual-mode mappings), but they would be more pertinent if they achieved updating the folds before.

Konfekt avatar Aug 24 '21 09:08 Konfekt