vim & python

?

=?iso-8859-1?Q?Fran=E7ois?= Pinard

[sb]
[...] but what about vim scripting with python? I can not find
*anything* about it (no docs, books or tutorials)
Just do:
:h python
Thanks, but that is more like a very abbreviated tutorial.

I did not read it as a tutorial, but as a concise and useful reference.
Where can I can the real documentation? It seems like the python
built into vim is different. [...] I want the real documentation for
the "vim" module accessible from vim. What classes, functions, values
are defined there, etc

The real documentation is the usual Python documentation, all that we
use outside Vim, plus the result of `:h python' for classes, functions
and values specific to Vim. There is not much of them, but there is no
need for much either; what is provided is surely sufficient for a great
lot of applications.
For example, doing
:py import sys
:py dir(sys)
produces no output. Odd. Same with
:py import vim
:py dir(vim)

The same would not give you output in Python either (unless you run
Python in an interactive read-eval-print loop, like when you call Python
without arguments from an interactive shell). However, you may use:

:py print dir(sys)
...
:py print dir(vim)

You have to ask for printing, if you want printing.
 
A

Antony Scriven

spam_bait101 said:
> François Pinard said:
> >
> > Just do:
> >
> > :h python
> >
>
> Thanks, but that is more like a very abbreviated tutorial. Where can I
> can the real documentation? [...]
> I want the real documentation for the "vim" module accessible
> from vim. What classes, functions, values are defined there, etc

:let @/='The vim module'|se hls
:h python

Is that not it?

Antony
 
M

Mikolaj Machowski

sb scripsit:
Thanks, but that is more like a very abbreviated tutorial. Where can I
can the real documentation? It seems like the python built into vim is
different. For example, doing

Note: python isn't built _into_ Vim. This is only interface to "real"
python.

m.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,817
Latest member
AdalbertoT

Latest Threads

Top