On 04/20/2011 02:08 PM, niva wrote:
Hi,
I am writing a script and have to detect some features of the opened
file.
my vimscript contains a recursive conditional blocks
if cond1
else
if cond2
if condN etc...
else
endif
endif
I would like to replace that by an object approach but how can I do
plaese ?
(just a nomenclature thing, this is "deep-nesting", not "recursion")
Without details regarding your tests, it's hard to produce a good
answer. Are they all just tests for equality against some constant?
if foo==1
if foo==2
if foo==3
...
Or are they more complex tests like
if foo==1
if bar<2
if baz>15
...
What are you doing at each point? Just assigning a value to an
outside value, or are you doing more complex logic and/or
multiple actions?
-tim
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php