Hari Krishna Dara wrote:

> I just want to thank Bram specially for all the scripting related
> improvements that were done in Vim7. After converting most of my plugins
> to use Lists instead of multvals plugin, other than having a cleaner and
> more compact code, my productivity has improved significantly (and using
> multvals itself was very productive over using simple
> curly-braces-names, which means for those not using multvals before, it
> will be a tremendous change). If you just compare my 4.0 version of
> perforce plugin with that of previous, you would see what I am talking
> about. Also, I have been making a few additional changes today and got
> some features done very easily, and previously I kept pushing them
> because it would have been very complex/time-consuming. E.g., as part of
> one feature, I had to determine what files need their status refreshed
> after updating a changelist, and I could do it in just 3 lines (to
> determine the outersection of prior and new filelist that the changelist
> contained).
> 
> The Lists, Hashes (and their constructs such as :for, map(), filter()),
> and a few other changes such as, <buffer> autocommands and <expr>
> maps/abbreviations etc. avoided a lot of complexity in my plugins.
> These features will go a long way in bringing more value to Vim, as
> more complex plugins can be written with less effort and more people
> will be willing to contribute plugins.

I'm glad you enjoy the new features.  I learned about Lists and
Dictionaries using Python and found them very powerful and at the same
time easy to use.

> I recently observed (from a Tony's post, I think) that you can now use
> += and -=, and this is a very nice addition to avoid some repetition.
> 
> I still miss pre and post increment and decrement operators (avoids a
> separate :let command by itself),

You mean, as in:

        :let linenr = a++

I don't know how difficult this is to implement, and if there are any
conflicts in the syntax.

> and indexed for loops. For the later,
> I get around using the below construct:
> 
> let loop_index = <initial value>
> while <condition>
>   try
>     <body>
>   finally
>     let loop_index = <new value>
>   endtry
> endwhile
> 
> This takes care of any :continue that you use inside, but this is
> clumsy.

Can't you use something like:

        for loop_index in range(1, 10)
          <body>
        endfor

-- 
ARTHUR:      Who are you?
TALL KNIGHT: We are the Knights Who Say "Ni"!
BEDEVERE:    No!  Not the Knights Who Say "Ni"!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to