As title. I want to create a function that facilitate this behaviour. I have tried this but it didn't work:
exe 'gv'
I tried from this direction because this works:
exe 'c!'
To run normal mode commands as ex command use :normal!
as in
normal! gv
Note, exclamation mark is for running non-mapped "built-in" functionality:
:nnoremap l :echo "hello"<CR>
" this would echo hello
:normal l
" this would move cursor right
:normal! l