So I do a visual selection and hit a vnoremap which calls a function and executes mode(), but everything it ever does it output n, indicating I'm in normal mode, even though that is certainly not true.vnoremap <silent> qb :<c-u>call <sid>func()<cr>function! func()  echo mode()endfunction
`mode()` always seems to return 'n'
vimscript
In visual mode, press :, then press enter or escape.  The selection is gone and you're in normal mode.  This is what's happening with your maps and why mode() returns n.To deal with this, you need tell your function that it should be in visual mode.  You already know that it will be since you're using vmap.vnoremap <silent> qb :<c-u>call <sid>func(1)<cr>function! func(visual)  if a:visual    normal! gv  endif  echo mode()endfunctionecho mode() will then give you the correct mode.