codemirror-vim icon indicating copy to clipboard operation
codemirror-vim copied to clipboard

Support mapping an operator (`g@` and `operatorfunc`)

Open natetarrh opened this issue 1 year ago • 1 comments

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.

natetarrh avatar Dec 31 '24 02:12 natetarrh