The Windows build refers to a Python DLL and will load it if it can find
it. However, Python itself is not included with Windows Vim and must be
separately installed. It must also be the same version of Python (e.g.,
python26.dll) and the DLL must be in the search path, :h python-dynamic
The average Vim user on Windows is, I suppose, somewhat likely to already
have Python, and, if not, will likely be amenable to installing it
-- especially if it gets them some useful Vim extensions.
But this is all supposition; I know of no way to get meaningful numbers on this.
--
/George V. Reilly geo...@reilly.org Twitter: @georgevreilly
http://www.georgevreilly.com/blog http://blogs.cozi.com/tech
> I'm wondering if there are some figures somewhere that would
> provide some sort of estimate of the percentage of vim users
> who have python installed, or would be free of objections to
> installing it if a module required it. I'm working on some
> vim modules, to be released for general use, that are
> threatening to become pretty complicated, and would prefer to
> write them in python. Is it likely that this would lock out
> a significant portion of the vim user population? Is it
> frowned upon to use external languages in cases where it's
> not entirely necessary? Python is more or less ubiquitous on
> linux installs, but I don't feel like I could guess at how
> many vim users on other platforms would be unable or
> unwilling to install it.
i'd like to count myself among those who like a lean build
with no extra languages compiled in and as few plugins running
as possible
whatever your modules do i would not consider them if they
require a python enabled vim
sc
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
Same is true for me. On windows, I don't even have Python installed
and wouldn't bother to install it just for a plugin. (Though, I'd like
to try out command-t[1], but even for that, I wouldn't install Ruby).
And on linux, it depends what build of vim I am using. Not all versions
are build with python/ruby/perl support and I usually can't rely on
having any interpreter available.
[1] http://www.vim.org/scripts/script.php?script_id=3025
regards,
Christian
Go for Python because VimL can be a lock-in (speed issues if you want to
do a lot).
Can you tell more about what you're going to implement?
Maybe you want to get some ideas from my sbt plugin:
www.github.com/MarcWeber/vim-addon-sbt
It mocks Vim functionality so that you can test it without Vim and use a
Python debugger etc. It also illustrates how to load an external .py
file (syntax highlighting, etc will be better then). Probably you
already know..
> vim. I also find that I tend more and more toward a functional
> programming style that doesn't work particularly well in vimscript.
:-). Vim does neither support Scala, F# nor Haskell. Maybe you should be
using lisp or scheme then.
Marc Weber
> Go for Python because VimL can be a lock-in (speed issues if you want to
> do a lot).
Isn't it rather the opposite? If something requires Python it's at the
mercy of the availability of Python and the ability of Vim to make use
of the available Python if the language is installed, while something
in native Vim will run anywhere.
I remain unconvinced of the utility of the additional languages for
anything other than personal use. Even when they are available the
linking may require a particular version, and that version may not be
the same as the version needed by other applications.
I can't remember the last time I saw a machine with Python installed
in a generally available form, and that machine only had it because
I put it there. (I've seen a few with it installed privately for one
specific application, but that's not terribly useful.) It's far from
ubiquitous, and very few people are going to go to the trouble of
installing a new language just to use a plugin.
--
Matthew Winn
You're writing code for a system you've been using. You say its not
ready for release. Still you care much about portability and other users
(?). One design goal should be : Never over engineer. Do what you have
to do because things are going to change anyway.
Such a change could be a team mate popping up who loves Emacs.
If you have a Python module he can hack the module and Emacs and reuse
your code. If you use VimL ..
Same applies if you want to offer the functionality in web application
or whatsoever.
About plugin / addon / extension? I didn't care much. I just tried to
get the job done.
Have a look from a historical point of view: VimL was great when it was
invented. That time it was ahead of the time by years. There was no
Python or X which could be used instead. However today those languages
exist. VimL can get jobs done. However its only used within Vim.
You can use Python. However the language bindings are rather limited. Eg
Vim module doesn't provide a call function which allows you to call vim
function without caring about quoting.. Nevertheless you can hack this
up fast.
When should you use VimL?
- you're going to use many Vim commands (regex, cursor movements etc)
When should you be using Python or something else?
- you're going to implement heavy stuff such as language parsers.
You want to operate on syntax trees etc.
Sometimes a solution which only gets done 90% can be implemented *much*
faster in Vim using commands you already know. So if you task is about
finding paragraphs and adding characters or joining those paragraphs
probably I'd try to get up a quick and dirty Vim script
Do whatever you feel most comfortable with.
Python:
Myself, I have Python installed "just in case", and even compiled into
Vim, but in practice I don't use it, in part because I don't know
Python, in part because, to extend or customize Vim, vimscript is good
enough for me. If I found a good useful script written in Vim + Python I
would not necessarily shun it as others have said they would; but so far
all my third- (and second- ;-) ) -party scripts are in "plain" vimscript.
About terminology: I think it isn't cast in bronze, but personally I use
"a Vim script" in two words to mean "a file to be sourced by Vim", or
"vimscript" in one word to mean "the programming language used to write
Vim scripts".
My main use (AFAIK) for the Python interpreter is to run Mercurial ;-)
Best regards,
Tony.
--
The fact that it works is immaterial.
-- L. Ogborn