vim - How to determine whether a set command failed to run in _vimrc? -
i added set commands _vimrc file, how can check whether set command executed or not? care status because there may different handling based on status of previous set command.
you try raise value of verbose
option until find value allows catch every error thrown every option (and set verbosefile=somefile
because life miserable if don't) suspect want can't done in manageable manner , not worth hassle.
here couple of idioms you, though:
try , catch errors
try set option=value catch /^vim\%((\a\+)\)\=:exxx/ set option=othervalue endtry
see :help :try
, :help :catch
.
note raising verbose
maximum value didn't allow me catch e596
error supposed thrown invalid font point remains valid: hard find silver bullet solution.
also, guifont
can take coma-separated string value can give n
fonts , let vim use first 1 works.
do if feature present
if has('mouse_sgr') set ttymouse=sgr endif
see :help has()
.
if gave concrete example of have in mind further.
Comments
Post a Comment