Using Vim's embedded Python?

Ng Pheng Siong ngps at post1.com
Tue Feb 22 11:51:12 EST 2000


Hello,

I'm writing a document that includes code snippets. I would like to
prefix the code with line numbers for ease of reference elsewhere in the
document.

I'm using Vim with Python embedded. I tried to loop over
vim.current.range, but apparently the lines in the range are read-only.

Vim's help text for Perl and Tcl seem to indicate those languages'
Vim interfaces do not have such constraints.

Any hints?

Alternatively, is this easily done using Vim's internal scripting
language?

(BTW, I think I should be able to do this with DTML and AMK's
nght2html.py. May have to go that way sooner then. ;-)

TIA. Cheers.

--
Ng Pheng Siong <ngps at post1.com> * http://www.post1.com/home/ngps


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list