SHANKAR R-R66203 wrote:
In a function,
I am executing a search.
I have to implement different things based on whether search got a
result or failed with an error.
exec '/^\w\+\t\w\+'
In the next line, I have to check whether the test passed or failed.
How do I do this ?
Regards,
Shankar
Shankar Ramakrishnan
Design Engineer
MicroController Division
Freescale Semiconductor
NOIDA - 201 301, INDIA
Mobile : 09899125114
Work : +91-120-4394021
Home : +91-120-4333249
This e-mail, and any associated attachments have been classified as:
[ ] Public
[ ] Freescale Semiconductor Internal Use Only
[ ] Freescale Semiconductor Confidential Proprietary
let v:errmsg = ""
exec '/^\w\+\t\w\+'
if v:errmsg =~ "^E486:"
" search failed
else
" search succeeded
endif
see
:help v:errmsg
:help E486
HTH,
Tony.