tmsvg / pear-tree

A Vim auto-pair plugin that supports multi-character pairs, intelligent matching, and more
MIT License
392 stars 12 forks source link

<Plug>(PearTreeJump) should skip whitespace #28

Closed tmsvg closed 5 years ago

tmsvg commented 5 years ago

Using <Plug>(PearTreeSpace) often leads to the cursor being one space away from the closing string. It would be good if <Plug>(PearTreeJump) ignored this space and just moved past the closing string:

{% foo| %} -> {% foo %}|

NicholasAsimov commented 5 years ago

@tmsvg Could you please tell how can this be used? For example if I want to use the closer character to jump automatically? E.g. in {% foo| %} I press } and it jumps over.

I've tried mapping imap } <Plug>(PearTreeJump) but that didn't seem to work.

lunacookies commented 5 years ago

Maybe this should be a separate issue, but currently pressing PearTreeBackspace after pressing PearTreeSpace doesn’t delete the space in front of the cursor as well as the one behind it. Personally I would prefer if this was the case.