function Hello()
echo "hello world\n"
endfunction
map <leader>w :call Hello()<CR>
In normal mode, I press <leader>
w to call the Hello() function once, but if I am in the selection mode, the Hello() function will be called n times, the number of n times and the selection The number of rows is the same. If I now want to call the function only once in selection mode, how should I deal with it?
Processing range by yourself:
See also: