I have a function somewhat like this:
function! MyFunction()
g/\v.(\n\n|\n*%$)/execute "normal! v{:call AnotherFunction()\<cr>"
endfunction
Now I want to be able to pass a range to that function. The problem is… how can I add the range (a:firstline
and a:lastline
) before the g
command?
I tried all the combinations I could think of (like execute a:firstline.','.a:lastline' 'g/...
), but I can't get it to work (maybe because I already use execute
in the global command).