The following works and is faster thatthan the matchstr()
solution:
fun! Getchar()
let part =return strcharpart(strpart(getline('.'), col('.') - 1)
return strcharpart(part, 0, 1)
endfun
nnoremap GG :echo Getchar()<CR>
See my question Reliably get the character at a byte index in a string.