"A.J.Mechelynck" <[EMAIL PROTECTED]> wrote on 2006.07.21 11:16:05: > [EMAIL PROTECTED] wrote: > > It seems that the command define are not available for the Vim 6.1 Tiny > > version, but when I :help command, it doesn't show any +xxx feature reqired > > for define command. > > Any work around? > > > > -- > > Sincerely, Pan, Shi Zhu. ext: 2606 > > > > Under ":help +feature-list" (with the plus sign) we see that there is a > +user_commands feature which require Normal version (or bigger). > > Also, remember that it's hard to effectively test for Tiny version, > since they cannot do expression evaluation, and everything from ":if" to > ":endif" will be disregarded (on both sides of the "else"). The only > possibility I see is something like this (untested): > > Or if you just want to disable soe statements in a Tiny version, wrap > them between ":if 1" and ":endif". (For a function: the definition _and_ > every invocation will probably need to be wrapped that way.) > > > Best regards, > Tony.
That sounds worse than I'd expected. What I want is not to quit vim, but simply skip the rest of the script _silently_. Something like: if !has("user_commands") finish endif However, it does not suppose to work, since the "finish" will not get executed. So, seems that there isn't any elegant way to quit in Tiny mode. What I want is something like: finish_the_current_script_silently_if_expression_evaluation_not_available obviously, this cannot be done by any vim scripts. What you have provided quits the Vim, which is not I want. Use "if 1 | endif " to wrap everything is possible, but not always, since the script may use "finish" to terminate itself and attach some data after the "finish". In the Tiny version the "finish" is not possible, so the script will execute into the data and got thousands of errors. -- Sincerely, Pan, Shi Zhu. ext: 2606