In Mac OS, I am trying to write a function that will say the current paragraph without moving the cursor, but something doesn't seem to work. This is what I have so far:
function! SayIt() let l:line = line(".") let l:col = col(".") execute "normal V" execute "silent '<,'>w !say" call cursor(l:line,l:col) endfunction vnoremap <leader>v :call SayIt()<cr>
If I remove the
execute "normal V" line the function works when I have previously selected a paragraph (or rather a long soft wrapped line). What am I doing wrong?