Skip to content

Conversation

seb-mueller
Copy link

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)

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)
@Konfekt
Copy link
Owner

Konfekt commented Aug 24, 2021

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.

@seb-mueller
Copy link
Author

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

@Konfekt
Copy link
Owner

Konfekt commented Aug 24, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants