I need your help. Suppose I have a function:
fun! Foo()
" Do awesome staff
endfunction
And the following key binding in my plugin:
vnoremap <LocalLeader>cv :call Foo()<RETURN>
My problem is that Foo() gets call for each line of my visual selection. Instead, I just want Foo() to be executed one and only once.
Any ideas?
Thanks in advance.
See :help function-range-example
fun! Foo() range
" Do awesome stuff
endfun
vnoremap <LocalLeader>cv :call Foo()<cr>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With