Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mapping an operator (g@ and operatorfunc) #199

Open
natetarrh opened this issue Dec 31, 2024 · 0 comments
Open

Support mapping an operator (g@ and operatorfunc) #199

natetarrh opened this issue Dec 31, 2024 · 0 comments

Comments

@natetarrh
Copy link

From :help map-operator:

g@{motion}		Call the function set by the 'operatorfunc' option.
			The '[ mark is positioned at the start of the text
			moved over by {motion}, the '] mark on the last
			character of the text.
			The function is called with one String argument:
			    "line"	{motion} was |linewise|
			    "char"	{motion} was |characterwise|
			    "block"	{motion} was |blockwise-visual|

Looking into what a proper surround.vim port would take, this is necessary for defining and applying the "surround" operator.

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

No branches or pull requests

1 participant