Yongwei Wu wrote:
[...]
If you are courageous enough see a real-world example of complicated
multi-language support, check my _vimrc at:
http://wyw.dcweb.cn/download.asp?path=vim&file=_vimrc.txt (as text) or
http://wyw.dcweb.cn/download.asp?path=vim&file=_vimrc.html (as HTML)
Best regards,
Yongwei
I see a number of tests for has("eval") in this vimrc, sometimes embedded in
longer if clauses.
Note that the following:
if has("gui_running)
" do something
endif
"
" then later
"
if ! has("gui_running)
" blah blah
if has("eval")
" do something
endif
" more blah blah
endif
will do nothing at all (neither the 'if has("gui_running")' nor the 'if !
has("gui_running") will be run) if expression evaluation is not compiled-in,
because in that case the if...endif structure is treated as a nestable
comment: see ":help no-eval-feature".
The one way that I know of executing some statements _only_ if evaluation is
not compiled-in, is to place them at the end of a script (such as a vimrc), as
follows:
if 1
finish
endif
" the following, to the end of the script, runs only if
" evaluation is not compiled-in.
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
240. You think Webster's Dictionary is a directory of WEB sites.