When I use command that generates error under silent!, I see
that v:errmsg is not assigned. For example:

    let v:errmsg ='' | let @/='lasjkdlsjklskj'
    silent! exe "norm! n"
    echo v:errmsg

- this prints empty v:errmsg, although "norm! n" generated an error.

How can I silently execute command but get it's error message,
do not lose it's v:errmsg ? (I suspect try+catch can do this, but I'm
not sure how.)

Thanks
Yakov

Reply via email to