Skip to content

Instantly share code, notes, and snippets.

@thinca
Created October 5, 2014 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thinca/ae2ea64729209582c80e to your computer and use it in GitHub Desktop.
Save thinca/ae2ea64729209582c80e to your computer and use it in GitHub Desktop.
let g:called = 0
nmap \\x <Plug>(test)
nnoremap <silent> <Plug>(test) :set operatorfunc=Test<CR>g@
function! Test(type)
let g:called += 1
normal! x
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment