Ruby+vim experts: how powerful is vim? please help

hi all,

i have a really important question to ask regarding vim’s power to be
programmed. i’m under a heavy deadline and i don’t have the time to
build nice GUI forms for every one of my db record types. so i’m looking
at vim as a possible alternative.

essentially data is pulled from my database, formated into yaml, and
presented to the user in vim. the user edits the yaml file, saves and
exits vim, and the file is ported back into the database. i have that
much working. very cool.

but what i need to do is build a vim extention using ruby for each
record type. the extensions need to provide the following:

  • prevent the user from editing a line based on the field name at the
    beginning of the line.

  • again, based on the field name at the beginning of the line, be able
    to do phrase (not just word) completions from a list of possibilites
    pulled from a lookup table in the database.

  • sort blocks of text based on a piece of text with it, for exmaple:

    items:
      - name: Product 1
        price: 10.50
      - name: Product 2
        price: 8.50
    

    resorted to:

    items:
      - name: Product 2
        price: 8.50
      - name: Product 1
        price: 10.50
    

there are probably a few other things, but if the above can be done then
vim will do the job.

finally, i may outsource the writing of some or all of these vim
extensions. does anyone want a little contract work?

thanks,
~tom (transami)

(p.s. the contract work could lead to more work and bigger $ if one was
interested)

We can try to do that, if it is at all possible (I’m not sure that Vim
has enough hooks to do exactly what you want). Please send me all info
you find relevant, we will try to experiment here. How much time do you
have for that?

···


Dmitry Borodaenko http://www.sam-solutions.net/
Unit Manager and Analyst 39 Platonova Street
SaM Solutions Ltd. 220071 Minsk Belarus
PGP fingerprint: 902B 5C62 E28D 59F0 F860 C39A C61A 895E 85EE 3E0E

On Tue, Aug 27, 2002 at 10:41:33PM +0900, Tom Sawyer wrote:

i have a really important question to ask regarding vim’s power to be
programmed. i’m under a heavy deadline and i don’t have the time to
build nice GUI forms for every one of my db record types. so i’m looking
at vim as a possible alternative.

essentially data is pulled from my database, formated into yaml, and
presented to the user in vim. the user edits the yaml file, saves and
exits vim, and the file is ported back into the database. i have that
much working. very cool.

but what i need to do is build a vim extention using ruby for each
record type. the extensions need to provide the following:

  • prevent the user from editing a line based on the field name at the
    beginning of the line.

  • again, based on the field name at the beginning of the line, be able
    to do phrase (not just word) completions from a list of possibilites
    pulled from a lookup table in the database.

  • sort blocks of text based on a piece of text with it, for exmaple:

    items:
      - name: Product 1
        price: 10.50
      - name: Product 2
        price: 8.50
    

    resorted to:

    items:
      - name: Product 2
        price: 8.50
      - name: Product 1
        price: 10.50
    

there are probably a few other things, but if the above can be done then
vim will do the job.

finally, i may outsource the writing of some or all of these vim
extensions. does anyone want a little contract work?

thanks,
~tom (transami)

(p.s. the contract work could lead to more work and bigger $ if one was
interested)