This repository was archived by the owner on Jun 24, 2023. It is now read-only.
Opfunc decorator#17
Open
averagehat wants to merge 15 commits into
Open
Conversation
Conflicts: plugin/snake/__init__.py tests.py
Owner
There was a problem hiding this comment.
interesting, but I can't see this working without a change to register_fn, right?
Contributor
Author
There was a problem hiding this comment.
Well, you have to pass the extra args from within a vim command, which is a mess. I just kept register_fn as it is and omitted the closing paren in the returned string in order to pass the extra vim args. A bit of a hack. I suppose register_fn could optionally format those keyword arguments itself, but I don't know if that would be used at all because AutoCommand context handles those situations where it might be useful.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is not ready to merge, but I am opening it up for input.
This works well enough for my purposes (I don't need to replace the text just to get it), however, the behavior when replacing the text doesn't always work as expected. I suspect this is because there is something I don't understand about how visual selection/replacement works in vim/snake.
For example, sometimes when making a selection with "V", the first character that was selected ends up outside of the replacing test instead of being replaced. The same thing seems to happen in normal mode sometimes.